Rob Booker - ADX Breakout updated to pinescript V5
Aug 10, 2022

The Rob Booker - ADX Breakout indicator identifies potential trend breakouts by quantifying trend strength through the Average Directional Index (ADX) and monitoring price consolidation within a lookback range. This tool helps traders capitalize on emerging trends while managing risk through automated target and stop-loss levels.
Usage
The indicator is used to detect periods of low volatility (consolidation) and signal entries when price breaks out of a defined range.
- Low ADX Phase: When the ADX line falls below the user-defined threshold (default 18), the background highlights blue, indicating a weak trend or consolidation phase.
- Range Formation: The script calculates a "BreakoutBox" based on the highest high and lowest low of a specific lookback period.
- Entry Signals: A long signal is triggered when the price crosses above the box upper level while the ADX is low. Conversely, a short signal is triggered when the price crosses below the box lower level while the ADX is low.
- Exits: Once a trade is active, the script plots green (Profit Target) and red (Stop Loss) lines based on a multiple of the breakout box width.
Details
The ADX (Average Directional Index) is a non-directional indicator that measures the expansion of price range over time. This version updates the original logic to Pine Script V5, ensuring compatibility with modern TradingView features like improved visual styling and input descriptions.
The strategy relies on the concept that markets transition from low-volatility ranges to high-volatility trends. By requiring the ADX to be below a specific level (e.g., 25 or 18) before a breakout, the tool filters for trades originating from a "coiled" market state, which often results in more significant moves.
Settings
ADX Settings
- ADX Smoothing Period: Sets the smoothing length for the ADX calculation (Default: 14).
- ADX Period: Sets the primary period for the Directional Movement Index (Default: 14).
- ADX Lower Level: The threshold below which a trend is considered weak enough to look for a breakout (Default: 18).
BreakoutBox
- BreakoutBox Lookback Period: The number of bars used to determine the high and low range for the breakout levels.
Take Profit and Stop Loss
- Profit Target Box Width Multiple: Multiplier applied to the breakout box width to set the take profit price.
- Stop Loss Box Width Multiple: Multiplier applied to the breakout box width to set the stop loss price.
Trade Direction
- Both(0), Long(1), Short(-1): Filters the strategy to execute only long trades, only short trades, or both.
FAQ
How do I interpret the ADX values in this script?
Values between 0-25 generally signify an absent or weak trend. This script specifically looks for these low values (defined by the Lower Level setting) to identify consolidation phases before a potential breakout.
Can I adjust the risk-to-reward ratio?
Yes, by modifying the "Profit Target Box Width Multiple" and "Stop Loss Box Width Multiple" in the settings, you can customize the distance of your exits relative to the volatility of the breakout range.
How do I access Rob Booker - ADX Breakout?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.