TradingView
Powerscooter
10 de Ago. de 2022 20:09

Rob Booker - ADX Breakout updated to pinescript V5 

Euro Fx/Japanese YenFXCM

Descripción

Rob Booker - ADX Breakout. The strategy remains unchanged but the code has been updated to pinescript V5. This enables compatibility with all new Tradingview features. Additonally, indicators have been made more easily visible, default cash settings as well as input descriptions have been added.

Rob Booker - ADX Breakout: (Directly taken from the official Tradingview V1 version of the script)

Definition
Rob Booker’s Average Directional Index (ADX) Breakout is a trend strength indicator that affirms the belief that trading in the direction of a trend and continuing to follow its pull is more profitable for traders, while simultaneously reducing risk.

History
ADX was traditionally used and developed to determine a price’s trend strength. It is commonly known as a tool from the arsenal of Rob Booker, experienced entrepreneur and currency trader.

Calculations
Calculations for the ADX Breakout indicator are based on a moving average of price range expansion over a specific period of time. By default, the setting rests at 14 bars, this however is not mandatory, as other periods are routinely used for analysis as well.

Takeaways
The ADX line is used to measure and determine the strength of a trend, and so the direction of this line and its interpretation are crucial in a trader’s analysis. As the ADX line rises, a trend increases in strength and price moves in the trend’s direction. Similarly, if the ADX line is falling, a trend decreases in strength and price then enters a period of consolidation, or retracement.

Traditionally, the ADX is plotted on the chart as a single line that consists of values that range from 0-100. The line is non-directional, meaning that it always measures trend strength regardless of the position of a price’s trend (up or down). Essentially, ADX quantifies trend strength by presenting in both uptrends and downtrends of the line.

What to look for
The values associated with the ADX line help traders determine the most profitable trades and where risk lies in the current trend. It is important to know how to quantify trend strength and distinguish between the varying values in order to understand the differences in trending vs. non-trending conditions. Let’s take a look at ADX values and what they mean for trend strength.

ADX Value:
0-25: Signifies an absent of weak trend

25-50: Signifies a strong trend

50-75: Signifies a very strong trend

75-100: Signifies an extremely strong trend

To delve into this a bit further, let’s assess the meaning of ADX if it is valued below 25. If the ADX line remains below 25 for more than 30 or so bars, price then enters range conditions, making price patterns more distinguishable and visible to traders. Price will move up and down between resistance and support in order to determine selling and buying interest and may then eventually break out into a trend or pattern.

The way in which ADX peaks, ebs, and flows is also a signifier of its overall pattern and trend momentum. The line can clearly indicate to the trader when trend strength is strong versus when it is weak. When ADX peaks are pictured as higher, it points towards an increase in trend momentum. If ADX peaks are pictured as lower - you guessed it - it points towards a decrease in trend momentum. A trend of lower ADX peaks could be a warning for traders to watch prices and manage and assess risk before a trade gets out of hand. Similarly, whenever there is a sudden move that seems out of place or a change in trend character that goes against what you’ve seen before, this should be a clear sign to watch prices and assess risk.

Summary
The ADX Breakout indicator is a trend strength indicator that analyzes price movements relative to trend strength to signal a user when is best for a trade and when is best to manage risk and assess patterns. As long as a trader recognizes strong trends and assesses the risk of each trade properly, they should have no problem using this indicator and utilizing it to work in their favor. In addition, the ADX helps identify trending conditions, but while doing so, also aids traders in finding strong trends to trade. The indicator can even alert traders to specific changes in trend momentum, allowing them to be primed for risk management.
Comentarios
q5iceman
Very nice conversion to V5! Do you have equivalent code for indicator with alert. Thank you!
DaytimeTinkerer
not sure why the logic for the box, it's basically just the Donchian Channel and should be stated as such.
arphaxadthecat
what does the purple shading colour indicate?
Powerscooter
@arphaxadthecat, That's when the ADX is in your desired range, so by default settings below 18.
arphaxadthecat
@Powerscooter, Thank you!
CraigV5
Hey Powerscooter, awesome indicator, been testing your strategy, looks great. I also trade the Rob Booker ADX breakout strategy #ADXtra (and ADX Exhaustion, ADX Climax, ADX Express ) when ADX < 25 level (weak) for more than 22 periods. I am trying to put together the indicator pinescript but not a strategy like yours based on the following parameters. Could you give me some pointers on how to create the histogram please?
ADX histogram plot
When ADX <25 level the area between the ADX line and the 25 level line (hline) fills with a histogram on the following parameters.
- The histogram start once ADX <25 and the histogram change colour to a different colour once ADX has been <25 for 22 periods. [similar to Woodies CCI indicator or MACD as example]
- When ADX >25 no histogram is calculated nor visible.
- The ADX periods are the same as the selected chart periods eg. second, minute, hour, day, week month and custom like 4 hours or 3 days
Powerscooter
@CraigV5, Hey Craig, here are some pointers:
-To fill the space between current ADX and an ADX=25 level line you can simply plot a line at ADX=25 using plot() (NOT hline()) and then fill the gap using the fill() function. You can make that line invisible if you wish.
-To make sure there is no histogram above 25 just make the colour of the fill function conditional. (Not the fill function itself) The easiest solution is probably to set the fill colour to 100% transparency when ADX is above 25)
-To make sure the histogram changes colour after 22 bars you should use the ta.barssince() or ta.valuewhen() functions. If you want to make it a colour gradient you can define the colour using
color.from_gradient()
-If you copy a generic ADX function from any other script (including this one) it should always adjust to the current timeframe, including custom.

Hope this helps!
CraigV5
@Powerscooter, Thank you so much, it certainly points me in a direction since I am stuck. I going to hack away at it to see how I can figure it out. I successfully trade with ADX / DMI but still need to learn Pinescript. I'll publish it to public when I have succeeded. Thanks for your help.
Kav7
Is this indicator repainting? I saw couple of times when the boxes are changing ?
Powerscooter
@Kav7, Rob Bookers ADX breakout is always start dependent since there is no pyramiding, so trades can change depending on starting point. The script itself uses no functions that suffer from repainting, but as with all Tradingview scripts, the recalculation settings can trigger repainting. tradingview.com/?solution=43000478429
Más