//@version=5
indicator("Donchian breakout")
len = input.int(20, title="channel_length")
upper = ta.highest(high, len)
lower = ta.lowest(low, len)
// new N-bar extreme made this bar, closing in the breakout direction
longSignal = high >= upper and close > open
shortSignal = low <= lower and close < open
alertcondition(longSignal, title="donchian_break_up")
plotshape(longSignal, title="long", location=location.belowbar)
plotshape(shortSignal, title="short", location=location.abovebar)
Overview
Donchian Breakout calculates highest highs and lowest lows across a user-defined lookback period. A bullish signal triggers when the current high matches or exceeds the channel high and the bar closes higher than it opened. A bearish signal triggers when the low hits or breaks the channel low with a lower close. Shapes plot breakout signals above or below bars in a separate pane by default. The script provides alert conditions but contains no execution logic or exit rules.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
channel_length
int
20
len
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
Sideway Zones Live is an overlay indicator that estimates inner and outer sideways bands from recent highs and lows with a rational quadratic kernel. It tracks swing pivots over a loopback period and counts bars that remain between the outer high and low. Afte
This indicator calculates dynamic upper and lower trendlines from pivot highs and pivot lows across a specified bar length. Trendline slopes are derived using ATR, standard deviation, or linear regression methods. It plots trendlines and breakout signal labels
This indicator detects inside candles inside larger parent candles on the price chart. It plots colored boxes around inside and parent candles, fills them with user-adjustable transparency, draws Fibonacci retracement lines and mother candle range lines, and d
This indicator maps Smart Money Concepts (SMC) market structure directly onto the price chart. It detects internal and swing structure breaks (BOS and CHoCH), tracks bullish and bearish order blocks, identifies fair value gaps (FVG), highlights equal highs and
The Market Tradability Engine calculates multi-factor tradability, balance, compression, and direction scores to evaluate market regime quality. It classifies market conditions into eight distinct states, including Balance, Compression, Ready, Breakout, Trend,
This indicator tracks swing highs and swing lows to generate trend-following trailing stop levels on the price chart. When the closing price breaks above the previous swing high, the system establishes a bullish state using the recent swing low as a trailing s