BuyHigh-SellLow Strategy evaluates alignment across seven moving average periods alongside multi-period and yearly high or low filters. Long positions are entered on breakout confirmations and exited through either a Donchian channel band or an ATR-based trailing stop loss. Users can customize moving average types, Donchian lookback periods, ATR trailing multipliers, and filter toggles directly on the price chart.
Donchian channel breakout entry and exit logic
Multi-period moving average alignment filter
Configurable ATR-based trailing stop loss
Long-term and yearly high or low condition filters
Multiple moving average types including EMA, SMA, HMA, and VWMA
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
donchianEntryLength
int
40
donchianEntryLength
donchianExitLength
int
20
donchianExitLength
considerNewLongTermHighLows
bool
true
considerNewLongTermHighLows
shortHighLowPeriod
int
120
shortHighLowPeriod
longHighLowPeriod
int
180
longHighLowPeriod
considerMAAlignment
bool
true
considerMAAlignment
Moving Average Type
string
ema
MAType
LookbackPeriod
int
40
LookbackPeriod
atrLength
int
22
atrLength
atrMult
int
4
atrMult
Exit Strategy
string
tsl
exitStrategy
considerYearlyHighLow
bool
true
considerYearlyHighLow
Show all 13 settings
Setting
Type
Default
Variable
backtestYears
int
10
backtestYears
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 running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos
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 strategy executes trades on short-term cryptocurrency charts using a combination of pivot support and resistance levels and a multi-pole smoothed trend filter. Entries trigger when price crosses the smoothed trend line and confirms above or below a short-
This strategy trades longs and shorts on the price chart. Long entries require a close above the prior Donchian high, a close above a long-term SMA, and RSI above a threshold, with size set as a percentage of equity. Long exits use a stop at the prior Donchian
This strategy plots Donchian channels, trailing stops, and profit targets directly on the price chart. It enters breakout trades using a 55-bar Donchian channel and sizes positions according to an ATR-based risk percentage per unit. The system adds units as pr
This strategy trades Nikkei 225 futures during a configurable overnight session, defaulting to 19:00–03:00 ET. It builds long and short trend conditions from an 8/21 EMA pair and a 200-period SMA, with RSI, momentum, an ATR-scaled breakout range, and a volume