Long entries occur when price surpasses the close by a user-defined multiple of the range, while short entries use a lower multiple. A trend filter can be applied, and trades can be skipped if the range is too small. Stop loss is set using the range multiplier, and positions exit after a specified number of days or at the next open. Trigger levels are plotted on the chart if enabled. The strategy supports backtesting with commissions and slippage.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Long: buy stop at close + k × yesterday's range
float
1.0
kLong
Short: sell stop at close − k × range
float
0.6
kShort
Direction
string
Long only
dirMode
Stop: entry − k × range (0 = no stop)
float
0.5
stopK
Exit
string
Hold N days
exitMode
Max days in trade
int
3
holdN
Trend filter: close above close N days ago
bool
false
trendOn
Trend lookback (days)
int
20
trendN
Skip if yesterday's range < % of price
float
0.0
rangeMin
Trade from
time
timestamp("2000-01-01T00:00:00")
fromT
Trade until
time
timestamp("2100-01-01T00:00:00")
toT
Show trigger levels
bool
true
showLv
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.
This strategy plots VWMA-based Bollinger bands on the 1-minute ES futures price chart for volatility analysis and potential breakout identification. It calculates dynamic long and short stop loss and take profit levels using percentage inputs relative to entry
This strategy runs on the price chart and enters long when a fast simple moving average crosses above a slow one, and short on the opposite cross, while closing the other side. Entries also need ATR above a filter, a pullback check, a minimum candle-body chang
This strategy trades long breakouts of a fast and a slow moving average on the price chart. It opens a long position when price crosses above either average, using a percentage of equity as size. It reduces the position by a set share when the high reaches the
This trend-following strategy adapts classic Donchian breakout channels according to market volatility regimes. It calculates an ATR percentile rank across a rolling lookback period, shifting dynamically between tighter breakout channels with smaller stops dur
This strategy executes breakout trades using two Donchian Channels alongside an optional 200-period EMA trend filter. Entries trigger when the price sets a new highest high or lowest low over the primary Donchian Channel period. Exits are managed via a shorter
This strategy implements a channel breakout system directly on the main price chart. It calculates highest highs and lowest lows over configurable entry and exit periods using historical candles. A long entry triggers when the close breaks above the entry chan