OPEN-SOURCE SCRIPT
Moving Average High Low Breakout

Moving Average High Low Breakout
Overview

Moving Average High Low Breakout is an adaptive trend-analysis indicator designed to identify potential price breakouts using dynamically calculated moving-average ranges, trend filtering, and volatility-based confirmation.
The indicator combines an adaptive Simple Moving Average (SMA), rolling high-low boundaries, a broader trend reference, and volatility-adjusted signal conditions. Its gradient candle-coloring system provides an intuitive visual representation of price positioning and directional momentum.
By adapting its calculations to changing price behavior, Moving Average High Low Breakout helps traders analyze potential breakout opportunities while maintaining a clear view of the prevailing market structure.
Features
How It Works
1. Adaptive Calculation
The indicator calculates a price efficiency ratio and uses it to determine an adaptive moving-average length. This length influences how the moving average responds to recent price changes.
2. Dynamic Range Construction
The highest and lowest values of the adaptive moving average form the initial boundaries. These boundaries are then adjusted using the efficiency ratio, user-defined sensitivity, and the longer-term trend moving average.
3. Breakout Detection
Potential signals are generated when price crosses the adjusted boundaries and satisfies the additional volatility-based threshold conditions.
4. Momentum Gradient
The candle-coloring system combines the source's position within the adjusted range with its distance from the trend moving average, normalized by ATR.
5. Trend Visualization
The midpoint of the adjusted high and low boundaries serves as the central trend reference. A translucent fill distinguishes the price's position above or below this reference.
Settings Guide
Suggested Usage
Moving Average High Low Breakout can be used to study potential breakout conditions, changing directional pressure, and the relationship between price and its adaptive trend structure.
Traders may combine its signals with support and resistance, market structure, volume, or higher-timeframe trend analysis to obtain additional context before making trading decisions.
Important Notes
This indicator uses price-based calculations and programmed threshold conditions. Its signals identify potential breakout events, not guaranteed continuation or reversal patterns. The indicator should be tested across relevant markets and timeframes before practical use.
Disclaimer: For educational and informational purposes only. This indicator does not constitute financial or investment advice.
Overview
Moving Average High Low Breakout is an adaptive trend-analysis indicator designed to identify potential price breakouts using dynamically calculated moving-average ranges, trend filtering, and volatility-based confirmation.
The indicator combines an adaptive Simple Moving Average (SMA), rolling high-low boundaries, a broader trend reference, and volatility-adjusted signal conditions. Its gradient candle-coloring system provides an intuitive visual representation of price positioning and directional momentum.
By adapting its calculations to changing price behavior, Moving Average High Low Breakout helps traders analyze potential breakout opportunities while maintaining a clear view of the prevailing market structure.
Features
- Adaptive Moving Average — Dynamically adjusts the moving-average calculation length according to the calculated price efficiency ratio.
- Dynamic High-Low Boundaries — Tracks the highest and lowest values of the adaptive moving average over the selected lookback period.
- Trend Filtering — Incorporates a longer-period moving average to help contextualize breakout conditions within the broader price trend.
- Volatility-Based Confirmation — Uses standard deviation and a configurable volatility factor to establish additional signal thresholds.
- Enhanced Breakout Conditions — Identifies potential bullish and bearish breakout events through price crossovers and volatility-adjusted filtering.
- Gradient Candle Coloring — Displays a continuous transition between bearish, neutral, and bullish colors according to the combined price-position and trend-strength calculations.
- Adjustable Gradient Smoothing — Uses EMA smoothing to create more gradual candle-color transitions.
- Dynamic Trend Fill — Highlights the relationship between price and the central trend reference with translucent bullish and bearish shading.
- Customizable Parameters — Offers control over the lookback period, trend moving average, sensitivity, volatility factor, filter strength, gradient smoothness, and color palette.
How It Works
1. Adaptive Calculation
The indicator calculates a price efficiency ratio and uses it to determine an adaptive moving-average length. This length influences how the moving average responds to recent price changes.
2. Dynamic Range Construction
The highest and lowest values of the adaptive moving average form the initial boundaries. These boundaries are then adjusted using the efficiency ratio, user-defined sensitivity, and the longer-term trend moving average.
3. Breakout Detection
Potential signals are generated when price crosses the adjusted boundaries and satisfies the additional volatility-based threshold conditions.
- Bullish Signal: Triggered when the source crosses above the adjusted lower boundary and exceeds the required volatility-adjusted threshold.
- Bearish Signal: Triggered when the source crosses below the adjusted upper boundary and falls below the required volatility-adjusted threshold.
4. Momentum Gradient
The candle-coloring system combines the source's position within the adjusted range with its distance from the trend moving average, normalized by ATR.
- Bullish Momentum: Candles transition toward the selected bullish color as the combined gradient becomes more positive.
- Bearish Momentum: Candles transition toward the selected bearish color as the combined gradient becomes more negative.
- Neutral Conditions: Colors remain closer to the neutral shade when the combined gradient approaches zero.
5. Trend Visualization
The midpoint of the adjusted high and low boundaries serves as the central trend reference. A translucent fill distinguishes the price's position above or below this reference.
Settings Guide
- Lookback Period: Sets the primary calculation period for the efficiency ratio and dynamic range.
- Source: Selects the price series used for calculations.
- Trend MA Length: Controls the period of the broader trend reference.
- Sensitivity: Adjusts the weighting between the adaptive range and the trend moving average.
- Volatility Factor: Controls the standard-deviation-based volatility threshold.
- Filter Strength: Adjusts the effective threshold applied to the breakout conditions. Higher values reduce the threshold and may allow more signals.
- Gradient Smoothness: Controls EMA smoothing of the candle-color gradient. Higher values generally produce slower color transitions.
- Bullish Color: Defines the color associated with positive gradient values.
- Bearish Color: Defines the color associated with negative gradient values.
- Neutral Color: Sets the transition color around neutral momentum.
Suggested Usage
Moving Average High Low Breakout can be used to study potential breakout conditions, changing directional pressure, and the relationship between price and its adaptive trend structure.
Traders may combine its signals with support and resistance, market structure, volume, or higher-timeframe trend analysis to obtain additional context before making trading decisions.
Important Notes
This indicator uses price-based calculations and programmed threshold conditions. Its signals identify potential breakout events, not guaranteed continuation or reversal patterns. The indicator should be tested across relevant markets and timeframes before practical use.
Disclaimer: For educational and informational purposes only. This indicator does not constitute financial or investment advice.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.