1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
RSI2 Optimized STEPFUN enters long when RSI crosses above the oversold level and short when RSI crosses below the overbought level. An optional SMA trend filter, volume confirmation, and cooldown can block entries. The default exit mode is a trailing stop; other modes exit at a fixed RSI level or at percentage take-profit and stop-loss. Position size is a percentage of equity, and pyramiding is disabled.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
RSI Length
int
2
rsi_length
Oversold Level
int
30
oversold
Overbought Level
int
70
overbought
Use Trend Filter
bool
true
use_trend_filter
Trend Filter SMA Period
int
200
trend_filter_period
Volume Confirmation
bool
true
use_volume_confirm
Volume Multiplier
float
1.5
volume_multiplier
Exit Mode
string
Trailing
exit_mode
Trailing Offset %
float
1.0
trail_offset_pct
Take Profit %
float
3.0
tp_percent
Stop Loss %
float
1.5
sl_percent
Position Size %
float
100.0
position_size_pct
Show all 14 settings
Setting
Type
Default
Variable
Use Cooldown Period
bool
true
use_cooldown
Cooldown Bars
int
3
cooldown_bars
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 enters long on an outside bar when the candle is bullish, the Klinger Volume Oscillator is positive, and price is above a Hull moving average. It enters short on an inside bar when the candle is bearish, the oscillator is negative, and price is b
This strategy trades on the price chart using multiple indicators. It enters long positions when price dips meet conditions on Bollinger Bands 40 and 20, RSI, MFI, volume and other thresholds. It exits at custom ROI profit levels based on RSI or after timeout
This strategy enters long when a fast EMA crosses above a slow EMA and RSI, ADX, and volume all clear their thresholds. It sizes the order from a percentage of equity and an ATR stop distance, then sets a partial profit target at a multiple of that risk. After
This strategy plots buy and sell markers on the price chart by combining a fast and slow ALMA crossover with a simple close-to-close momentum check. A long marker appears when the fast ALMA crosses above the slow ALMA and momentum is positive. A short marker a
This strategy plots long and short markers on the price chart. It builds a composite index from RSI change and a short RSI average, then requires that index, a one-minute cumulative volume delta, and a relative volatility index to agree. EMA, SMA, and VWAP rel
CryptoSwarmStrategy is a chart overlay strategy that enters long when a fast EMA crosses above a slow EMA, RSI is below the oversold level, and volume exceeds its 20-bar average. It enters short on the opposite EMA cross with RSI above overbought and the same