Strategy Examples incorporates a moving average crossover system using SMA or EMA, an RSI mean reversion model operating on overbought and oversold threshold bounces, and a Bollinger Bands breakout trigger. Trades are managed with percentage-based stop loss and take profit orders. Configurable inputs allow customization of calculation lengths, indicator thresholds, and position exit targets.
Moving average crossover system using EMA or SMA
RSI mean reversion entry signals
Bollinger Bands breakout conditions
Percentage-based stop loss and take profit exit management
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Fast MA Length
int
10
fast_length
Slow MA Length
int
20
slow_length
Use EMA (vs SMA)
bool
true
use_ema
RSI Length
int
14
rsi_length
RSI Overbought
float
70
rsi_overbought
RSI Oversold
float
30
rsi_oversold
Stop Loss %
float
2.0
stop_loss_pct
Take Profit %
float
4.0
take_profit_pct
BB Length
int
20
bb_length
BB Multiplier
float
2.0
bb_mult
Use Trailing Stop
bool
false
use_trailing
Trailing Stop %
float
1.5
trail_pct
Show all 19 settings
Setting
Type
Default
Variable
Use Partial Exits
bool
false
use_partial
Partial Exit %
float
50
partial_pct
ATR Length for Position Size
int
14
atr_length
Risk Per Trade %
float
1.0
risk_per_trade
Start Date
time
timestamp("01 Jan 2020 00:00")
start_date
End Date
time
timestamp("31 Dec 2024 23:59")
end_date
Trading Session
session
0930-1600
session_time
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 mean-reversion strategy combines multi-timeframe exponential moving averages, Bollinger Bands, and the Relative Strength Index. It generates long and optional short trade signals when price interacts with the Bollinger Bands alongside RSI threshold confir
This strategy draws on the price chart and combines Stochastic RSI, the Money Flow Index, and an exponential moving average to open long or short trades. Longs use the lower oscillator thresholds and shorts use the upper ones, with direction limited to longs,
This strategy plots exponential-moving-average Bollinger bands on the price chart and calculates RSI. It opens a long position when close crosses above the upper band while RSI is at or above a threshold, the date filter allows trading, and no position is open
This strategy implements Larry Connors' 2-period RSI mean-reversion algorithm overlaid on the price chart. It filters trades using a long-term Simple Moving Average (SMA), entering long positions when the price trades above the SMA and the short-term RSI drops
This strategy combines multi-timeframe RSI analysis with exponential moving average filters to execute trades on price bounces. It evaluates daily and weekly RSI levels alongside pip-distance thresholds between fast, slow, and long-term EMAs. Position entries
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