Trend Day IndentificationVolatility is cyclical, after a large move up or down the market typically "ranges" during the next session. Directional order flow that enters the market during this subsequent session tends not to persist, this non-persistency of transactions leads to a non-trend day which is when I trade intraday reversionary strategies.
This script finds trend days in BTC with the purpose of:
1) counting trend day frequency
2) predicting range contraction for the next 1-2 days so I can run intraday reversion strategies
Trend down is defined as daily bar opening within X% of high and closing within X% of low
Trend up is defined as daily bar opening within X% of low and closing within X% of high
default parameters are:
1) open range extreme = 15% (open is within 15% of high or low)
2) close range extreme = 15% (close is within 15% of high or low)
There is also an atr filter that checks that the trend day has a larger range than the previous 4 bars this is to make sure we find true range expansion vs recent ranges.
Notes:
If a trend day occurs after a prolonged sideways contraction it can signal a breakout - this is less common but is an exception to the rule. These types of occurrences can lead to the persistency of order flow and result in extended directional daily runs.
If a trend day occurs close to 20 days high or low (stopping just short OR pushing slightly through) then wait an additional day before trading intraday reversion strategies.
Rangetrading
MM Chop Filter Range BoxesMatch with the MM Chop Filter
This draw Non repainting range boxes when the oscillator see a range.
-Breakout Buy/Sell Signals and Exit signals when prices enters a range just in case you did get into a trade. .
-Alarms to match the signals
How to use
Match with the oscillator and always trade the trend with your strategy confirmation and the breakout this indicator provides
Session's First Bar RangeFirst Bar is crucial when there is gap up or gap down opening. It is recommended to use 15m Timeframe for better use.
Crossing this range signifies the absorption of existing buyers/sellers in the opening session and sometimes decide the trend onwards.
Fear Of Missing Out grid of forex tradingAbstract
This script finds potential safe grids placing limit orders without fear of missing out.
This script computes grids according to power of 1.0025 .
You can reference those price levels for your trading.
Introduction
Grid trading is a popular trading method.
Traders plan several price levels as grids and repeat buying at lower grids and selling at higher grids.
Grids can be round number like multiple of 100 pips.
Grids can also be support and resistance according to price history.
Some traders may think they need to adjust grids to trade.
However, there are several problems in choosing grids.
One problem is rate of change is related and therefore exponential. 20 to 30 is different from 30 to 40.
Another interesting point is there are some special impressing reversal price levels.
Several months ago, I had a question why usdjpy bounced near 108.3 .
After using a calculator, I found that 108.3 = 100 * 1.083 ≒ 100 * pow(1.0025,31) .
1.0025 , as known as 0.25% of change, is a potential stop out zone.
Therefore, we can compute grids and one grid is a little more than 1.0025 times than an another one.
After we finished computing grids, we can consider buy and sell near those grids.
Note that different traders may obtain different grid values.
For example, from 1.0 to 2.0 , it can be splited as 270 grids or 277 grids because pow(1.0025,277)<2 .
Those grids cannot always imply potential reversal points but they can be useful for traders looking for 0.25% profit targets with reducing fearing of buying or selling too early.
Computing grids
This script split from 1.0 to 10.0 into three segments.
One is 1.0 to 2.0 .
The second segment is from 2.0 to 5.0 .
The third segment is from 5.0 to 10.0 .
This script does the same thing for 0.1 to 1.0 , 10.0 to 100.0 , and so on.
For 1.0 to 2.0 and 5.0 to 10.0 , this script split a segment as 270 grids.
For 2.0 to 5.0 , this script split a segment as 360 grids.
The last step is display the next grids to the daily low and daily high.
Maybe also display the grids behind grids shown.
Parameters
x1,x2,x3,x4 : display the next x1,x2,x3,x4 grids to daily high and daily low. 1 means the next grid to daily high and daily low. 2 means the next grid to 1.
x_seg : default 2.0 . This script split from 1.0 to 10.0 into three segments. One is 1.0 to x_seg. The second segment is from x_seg to 10.0/x_seg . The third segment is from 10.0/x_seg to 10.0 .
x_grid1 : how many grids in the first segment
x_grid2 : how many grids in the second segment
x_lowprice : add this number for bigger grid distance. Generally, you don't need this number when trading forex but you may need it in stock trading. For stocks with price between 50 to 100, I recommend you use x_lowprice=100.
Conclusion and suggestions
This script can find potential grids for trading.
If price touches grids usually, we can consider buy and sell after price touches grids.
If price reverses before touching grids usually, we may consider buy and sell before price touches grids.
Those grids can remind us don't buy too much unless the price touches the next grid.
For instruments with less volatility, maybe we need more grids.
For traders with more money, they may also consider more grids for more dedicated range trading to collect more profit.
Reference
Sorry, I forgot them.
Trading Range FinderWhat is it?
This indicator is a visual representation of the ADX indicator that shows where the areas of weak trends are. Anything shaded in a gray background implicates that the chosen market is experiencing a weak trend.
These areas of weak trends are seen typically when ADX drops below 20-25 but this script is customizable to change where you want that threshold.
Why did I make it?
I made this indicator to be used in combination with other trading indicators to eventually be used to identify when a market is range-bound/sideways.
Since momentum-based indicators can be "thrown off" in sideways market conditions, I will be using this visual indicator to identify when it is best to filter out a trade signal in a momentum-based strategy.
Michigandolf's 30min Opening RangeThis script plots the 30min Opening Range as well as the previous day's high & low.
Description:
Blue Line = Top of the 30min Opening Range for the session
Pink Line = Bottom of the 30min Opening Range for the session
White Line = Mid-Point of the 30min Opening Range for the session
White Transparent Area = The full range of the 30min Opening Range
Green Line = Yesterday's High for the session
Red Line = Yesterday's Low for the session
Use:
The Opening Range will continue to expand until the first 30minutes of trading has passed, at which point the range will lock in place for the remainder of the trading session. Many traders use these important levels to gauge trade entries and exits (e.g. Mark Fisher's ACD strategy).
This script does not work currently work for futures (e.g. ES, NQ, RTY) due to the session start time. Will configure for futures trading in a future update.
RedK_9/30 Trader_v1: aka The MusicianThis is my implementation of a simple trading system inspired by the 9/30 trading strategy, which i came across few years ago. i hope some traders are still using it :)
(please google "9/30 trading strategy" if you're not sure what it is)
- the improvements i added focus on: faster (long/short) signals, discovery of best entry "zone", ride the trend
- no exit option, trader can use a pre-set target, a trailing stop, or any other mechanisms
- i tried to explain some of the definitions and rules on the below chart
- in spite if its simplicity, the 9/30 has a lot to offer - different traders will also use it differently and add their own "do's and don't's"
default settings should be adjusted to suit timeframe, type of trader and what is being traded (Stocks, FOREX,..etc) - the concept itself is very flexible and well-tested for mechanical trading.
code-named "The Musician" due to the 5-line plot :)
i will continue to improve this work whenever i find time - i liked it a lot.. (please tag the idea to receive the updates)
Extras and improvements (compared to the classic 9/30 concept)
---------------------------------------------------------------------------------
* signal line is a smoothed zero-lag WMA of a shorter length (responds faster to trend change = faster signal)
* instead of a single longer MA line, we utilize an "average range" -based channel (not ATR, but provides the same concept) to provide the ideal "entry zones" in both directions - an adjustable multiplier is included in the settings to adjust the channel width
* adds an optional long EMA as additional filter (take longs only above, take shorts only below)
* clearer visualization
What's next:
==============
* clean-up code
* add signals (arrow-up & arrow-dn) for entry and for exit
* tri-color signal line (green on long, red on short, gray on no trade)
* other options for the channel (ATR-based, DC center-line..etc)
* other MA-type options for the Filter MA (SMA, WMA ?)
* maybe: convert to strategy and back-test
Please feel free to explore and test - Comments and feedback are welcome.
Good Luck!
Williams %RHi! WPR is the Williams percentage range indicator in my design. The main idea is that the intersection of the indicator and the moving average in the overbought and oversold zones + color highlighting gives more clear visual signals for making trading decisions based on this indicator.
Trend Type Indicator by BobRivera990Usage:
The purpose of this indicator is to programmatically determine the type of price trend using technical analysis tools.
You can do a quick check on the asset’s higher and lower time frames. For example, if you are trading on an H1 chart, you can check the m5 chart to ensure that the trend is in the same direction and similarly check the H4 chart to ensure that the higher time frame price is also moving in the same direction.
If multiple time frame charts confirm a similar trend, then it is considered a very strong trend and ideal for Trend trading.
Remarks:
By default, the last status is related to 8 periods before the latest closing price.
Related definitions:
The three basic types of trends are up, down, and sideways.
1. Uptrend
An uptrend describes the price movement of a financial asset when the overall direction is upward. The uptrend is composed of higher swing lows and higher swing highs.
Some market participants ("long" trend traders) only choose to trade during uptrends.
2. Downtrend
A downtrend refers to the price action of a security that moves lower in price as it fluctuates over time.
The downtrend is composed of lower swing lows and lower swing highs.
3. Sideways
A sideways trend is the horizontal price movement that occurs when the forces of supply and demand are nearly equal. This typically occurs during a period of consolidation before the price continues a prior trend or reverses into a new trend.
How it works:
Step 1: Sideways Trend Detection
In this step we want to distinguish the sideways trend from uptrend and downtrend. For this purpose, we use two common technical analysis tools: ATR and ADX
1. Average True Range (ATR)
The average true range (ATR) is a technical analysis indicator that measures market volatility.
We also use a 20-period moving average of the ATR.
When the ATR is below the average of its last 20-periods, it means that the rate of price volatility has decreased and we conclude that the current trend is sideways
2. Average Directional Index (ADX)
The average directional index (ADX) is a technical analysis indicator used by some traders to determine the strength of a trend.
The trend has strength when ADX is above 25.
So when the ADX is less than or equal to 25, there is no strong trend, and we conclude that the current type of trend is sideways.
Step 2: Detect uptrend from downtrend
If it turns out that the current price trend is not sideways, then it is either uptrend or downtrend.
For this purpose, we use plus and minus directional Indicators (+ DI & -DI).
A general interpretation would be that during a strong trend, when +DI is higher than -DI, it is an uptrend. When -DI is higher than +DI, it is a downtrend.
Parameters:
"Use ATR …" ________________________// Use Average True Range (ATR) to detect Sideways Movements
"ATR Length"_______________________ // length of the Average True Range (ATR) used to detect Sideways Movements
"ATR Moving Average Type" ___________// Type of the moving average of the ATR used to detect Sideways Movements
"ATR MA Length" ____________________// length of the moving average of the ATR used to detect Sideways Movements
"Use ADX ..."_______________________ // Use Average Directional Index (ADX) to detect Sideways Movements
"ADX Smoothing”____________________// length of the Average Directional Index (ADX) used to detect Sideways Movements
"DI Length"_________________________// length of the Plus and Minus Directional Indicators (+DI & -DI) used to determine the direction of the trend
"ADX Limit" ________________________// A level of ADX used as the boundary between Trend Market and Sideways Market
"Smoothing Factor"__________________// Factor used for smoothing the oscillator
"Lag"______________________________// lag used to match indicator and chart
Resources:
www.investopedia.com
Box Range AlertSimple Script for getting alerts on the crossing of Upper & Lower levels either way.
Good for Free users as they can only use 1 alert at a time. So this indicator will be useful to get alerts on both Breakout Or Breakdowns.
Just add input Price manually and set alerts.
User-Inputed Time Range & FibsGreetings Traders! I have decided to release a few scripts as open-source as I'm sure others can benefit from them and perhaps make them better.(Be sure to check my Profile for the other scripts as well: www.tradingview.com).
This one is called User-Inputed Time Range & Fibs.
The idea behind this script is to record the Range Highs and Lows of a User Defined Period, and plot potential Targets based on either Fibonacci Extensions or a Multiple of the Range Size. I created this originally for use with the US Session Initial Balance(From 9:30-10:30AM EST), however it can be set to any time period.
What is Initial Balance? In simple words, Initial Balance (IB) is the price data, which are formed during the first hour of a trading session. Activity of traders forms the so-called Initial Balance at this time. This concept was introduced for the first time by Peter Steidlmayer when he presented the market profile to traders(atas.net).
The IB is monitored as a break-out area for Range Extension traders. The IB High is also seen as an area of resistance and the IB Low as an area of support until it is broken(www.mypivots.com).
As a note, depending on the Time Zone you are in, you may need to manually add or subtract from the Timed Range to match the desired Time. For example in NY Eastern Time, I have to use 8:30-9:30AM to Capture the 9:30-10-30AM IB for ES and NQ. Similarly, I must use 14:30-15:30PM to Capture the 9:30-10-30AM IB for BTC. You will need to make adjustments based on the Time Zone you are located in.
I wanted to give a Special Thanks to @PineCoders for the Custom Rounding Function from Backtesting/Trading Engine--> (), Pinecoders.com for help with Tracking the Highs/Lows--> (www.pinecoders.com), and @TradeChartist for allowing me to use some of the code for the Fibonacci Extensions from his script here--> ().
If you like User-Inputed Time Range & Fibs, be sure to Like, Follow, and if you have any questions, don't be afraid to drop a comment below.
Trend-Range IdentifierTrend trading algorithms fail in ranging market and Swing trading algorithm fail in trending market. Purpose of this indicator is to identify if the instrument is trending or ranging so that you can apply appropriate trading algorithm for the market.
Process:
ATR is calculated based on the input parameter atrLength
Range/Channel containing upLine and downLine is calculated by adding/subtracting atrMultiplier * atr to close price.
This range/channel will remain same until the price breaks either upLine or downLine.
Once price crosses one among upLine and downLine, then new upLine/downLine is calculated based on latest close price.
If price breaks upLine, the trend is considered to be up until the next line break or no lines are broken for rangeLength bars. During this state, candles are colored in lime and upLine/downLine are colored in green.
If price breaks downLine, the trend is considered to be down until the next line break or no lines are broken for rangeLength bars. During this state, candles are colored in orange and upLine/downLine are colored in red.
If close price does not break either upLine or downLine for rangeLength bars, then the instrument is considered to be in range. During this state, candles are colored in silver and upLine/downLine are colored in purple.
In ranging duration, we display one among Keltner Channel, Bollinger Band or Donchian Band as per input parameter : rangeChannel . Other parameters used for calculation are rangeLength and stdDev
I have not fully optimized parameters. Suggestions and feedback welcome.
SuperTrendRange by DGTSuperTrendRange study attempts to determine the state of the market
• whether a well-established bull/bear trend is present
• whether the market is trading in a range
SuperTrendRange (STR) takes into account the volatility of the market - further details regarding volatility can be found in the description of “Volatility Bands by DGT” study
Due to its similarities to SupertTrend (ST) and Parabolic SAR (SAR), I will try to explain by stating differences between them
SuperTrendRange uses both the ATR (Average True Range) and STDEV (Standard Deviation) as part of its calculations - unlike ST and SAR where they use only ATR
Sensitivity of the indicator is adjusted using the multiplier setting of both ATR and STDEV
Additionally, unlike ST, the source of the basis of SuperTrendRange can be selected among the assets price value or its moving average
Source and Length are adjustable too
The SuperTrendRange, like Parabolic SAR indicator, appears on a chart as a series of dots, either above, below or unlike Parabolic SAR both above and below of the asset's price
A dot placed
- below the price when the market is trending upward
- above the price when it is trending downward
- both above and below when the price starts moving sideways – this is a feature that both SuperTrend and Parabolic SAR misses, where they are known to produce false signals and losing trades, whereas SuperTrendRange emphasis the zones of the ranges occurring and in most cases are considered no trade recommended zones. Please note that the range width may vary depending on how the market is volatile. It is up to the users to trade if it fits their trading strategies
Dots plotted above and below can be assumed as Support and Resistance levels
Example usages – with trading opportunities
Gold Monthly Chart
Bitcoin Daily Chart
Disclaimer:
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Hancock - Renko Brick ProductionThis is the accompanying script that shows how many renko bricks were produced in each direction per candle. It gives a basic indication of volatility, some might find it useful.
Happy trading
Hancock
Hancock - RenkoThis is the first release of Renko indicator.
Renko is plotted over candles and best calculates the number of Renko bricks printed up or down per candle which can be viewed from the data window. It plots the high and low of a the bricks, if numerous bricks are printed on a candle, as well as the open and close of a Renko brick.
This will be actively developed and improved over the next few months and i will be basing other indicators from this Renko.
Happy trading
Hancock
cATRpillerThis indicator is used to identify range breakouts using an ATR multiplier. My first script, Im sure there are indies out there like this, but this my favorite way to identify breakouts and trends.
ATR Timeframe RangeThis indicator shows the ATR range on the daily or any other timeframe on your current chart. All settings are fully customize-able.
Linear Regression ++Due to public demand
Linear Regression Formula
Scraped Calculation With Alerts
Here is the Linear Regression Script For traders Who love rich features
Features
++ Multi time frame -> Source Regression from a different Chart
++ Customized Colors -> This includes the pine lines
++ Smoothing -> Allow Filtered Regression; Note: Using 1 Defaults to the original line. The default is 1
++ Alerts On Channel/Range Crossing
Usage
++ Use this for BreakOuts and Reversals
++ This Script is not to be used Independently
Risks
Please note, this script is the likes of Bollinger bands and poses a risk of falling in a trend range.
Signals may Keep running on the same direction while the market is reversing.
Requests
If you have any feature requests, comment below or dm me. I will answer when i can.
Feel free to utilize this on your chart and share your ideas
For developers who want to use this on their chart, Please use this script
The original formula for calculation is posted there
❤❤❤ I hope you love this. From my heart! ❤❤❤
Strategy - Bobo PAPATRHi I've revamped this bot mentioned in the linked idea to make it work with v4 of pine. In doing so there are some very significant changes to how it works. The main one is that it no longer uses traditional daily pivot calculations to calculate the bands. It creates a more dynamic intraday set of pivot points based on recent price action rather than yesterday's ohlc. As published, the bot is tuned for a 15 min time frame. But it actually works well on lower time frames you just need to adjust the lookback periods in settings a bit to re tune it. It's also tuned to ES really but will need tweaking for a different instrument at the very least.
The basic concept is recent price action is used to calculate a 'middle' around which red and green bands are located. Their position or width is largely determined by recent volatility. The middle line is again calculated from recent price action. The three lines from that form a tradeable range with green at the top and red at the bottom. The strategy is simple enough, it shorts as it sinks from outside red, and longs when rising above green. The basic principle being that once you enter that range you have a high probability of hitting the middle before you hit your stop loss. So the basic principle is you are trying to capture the inherent ranginess of liquid indices like S&P 500. That back and forth movement that happens. The bot is capturing this by fading extremes of a recent range but the problem with that is you'dd get murdered in a strong trend. To mitigate that there is a trend calculation running in the background the will prevent trading against firm trends mostly. So the bot should trade mostly in rangy conditions because that is what it is trying to do.
Bot will close issue close signals automatically upon crossing the middle, it also will close automatically at predefined stops or limits. These values are denominated in market mintick values. For example the CFD SPX500 has a mintick of 0.1. Therefore a stop value of 100 will equate to 10 points on the index. If trading the same market via ES1! the mintick value is different - 0.25. So in this case a value of 40 is required to set the stop at 10 points.
Anyway shout if you have questions. Hope it's useful.
TVC:SPX OANDA:SPX500USD
$0 Monthly Weekly & Daily OHLC Viewer
Visualizer of current or previous month(s), week(s) & days ranges
Purpose: View last Monthly, Weekly, Daily, and/or a custom time interval OHLC, i.e. previously closed/confirmed or the ongoing higher time interval ranges
Main configurations available:
- 2 main reporting modes: View the current/ongoing M/W/D candles' OHLC (live, repaints) or report OHLC of last closed ones, i.e. previous Montly, Weekly and/or Daily
- View only latest Monthly, Weekly and/or Daily OHLC (lines) or all past ones (~channel)
- Set your own time interval for its price range(s) to be reported, e.g. last quarter '3M', 12H '720', or hide it
- View one specific day of the week OHLC reported all over the week
Graphic/visual configuration:
- Show the High & Low levels or not
- Show the Open & close levels or not
- Display a background color between top & down or lines only
- Change the background color depending if is/was rising or falling price
- Highlight the top & down breaches of higher timeframe resolution candles: Daily breaching last Weekly range, and/or the Weekly the Monthly one
- Colors & styling can be edited from the indicator's styling configuration panel
Depending on its expected usage, those configurations enable to:
- Consider previously closed candles OLHC as reference top & down ranges (support & resistance, breaches)
- Review chart's current candles evolution within their higher time interval / candle (M/W/D)
- Consider specific week days' range as a reference for the week trend
- Have a general overview of the market evolution trends
Default config is to view current candles evolving within their higher time interval / candle, while reporting last previously closed M+W is a preferred usage. Play with the config settings to find your setup.
View ongoing M+W+D OHLC with dynamic background color:
View previously closed M+W+D OHLC:
View closed H&L for M+W+D, latest only:
View Mondays' OHLC:
Feedback & support welcome.
Normailzed CandleThis indicator normalizes Day's candle with Open. Idea is to see the daily movement in the context of the Open of the Day.
Larry Williams talks about Open being the most important price of the day. Hence, this indicator.
The Green line is average Open-to-High for occurrences of Red days. The Red line is average Open-to-Low for occurrences of Green days.
Average are not perfect calculations since occurrences(of Red or Green) will vary within the time-span used for averages.
These can used to gauge likelihood of the intra-day price reversal. If the price exceeds green/red line, there is higher likelihood of the price closing above/below open.
The blue lines are average Open-to-close for Green and Red occurrences.
Be careful on days where consecutive 3rd Highest High or Lowest Low day is made and also on the next day after such day. Prices may turn direction at least for a short while.
The precursor to this script of the Candle Infopanel script. That script was just numbers in panel and this is a graphical representation. I
Some of the calculations from original script are commented here because it would make visuals clutters (and probably the left-out calculation are not critical to making trade decisions!)
Developing Range v1.0Developing Range v1.0
----------------------------
Azimuth Dynamics
Scalping tool for help finding potentially high probability reactive levels. I suggest using on a 5min chart.
GRAY BAND: yesterday's High-Low range
BLUE BAND: today's Developing Range. Mean of today's High-Low range so far and yesterday's High-Low range, this is calculated for each of today's bars
THIN BLUE LINE: the mean of today's range median and yesterday's range median.
Note: we do not use the DAILY bar via 'security()' to obtain today's high and low. This would essentially be forward looking, instead we use iteration to check from the current bar back to midnight, bar by bar. This then allows a developing range to be established as the day prints new highs and lows.
Inspired by volatility trading textbook.
5 Sessions RangeThis script averages the range of the previous 5 sessions and displays it on the chart
The sessions are adjustable