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
Crypto Mean Reversion buys dips when a reversal candle appears, a three-day trend gate is satisfied, and one of three paths holds: Z-score with RSI, Z-score with the lower Bollinger Band, or RSI with the lower band, each with its own volume floor. Exits use an ATR stop, a target at the SMA or a multiple of risk, a mean-cross exit, an overbought exit and a time limit. Presets and a date range are included.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Setting chain
string
Bot live config
preset
Limit backtest to date range
bool
false
useRange
Start
time
timestamp("1 Jan 2025 00:00 +0000")
rangeStart
End
time
timestamp("1 Jan 2027 00:00 +0000")
rangeEnd
Lookback (SMA / Z / BB / volume)
int
20
lookback
Entry Z-score
float
-1.2
entryZIn
Mean-cross exit Z
float
0.3
exitZIn
RSI oversold
float
45
rsiOSIn
RSI overbought
float
55
rsiOB
Bollinger std
float
2.0
bbStd
Vol floor — path 1 (Z+RSI)
float
1.1
volFloor1In
Vol floor — path 2 (Z+BB)
float
1.3
volFloor2
Show all 19 settings
Setting
Type
Default
Variable
Vol floor — path 3 (RSI+BB)
float
1.5
volFloor3
Trend gate lookback bars (864 = 3d on 5m)
int
864
trendBars
Trend gate min % gain
float
2.0
trendMinIn
ATR stop multiple
float
2.0
atrMult
Time exit (bars)
int
20
maxHoldBars
Min hold (bars) before signal exits
int
1
minHoldBars
Enable 3-day trend gate
bool
true
useTrendIn
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 trades both long and short on the price chart. It enters long after a five percent or larger drop over the last thirty minutes and short after a matching rise. Two dollar-cost-averaging adds increase size when price moves against the position. A
This is a Pine Script strategy that executes a fixed historical backtest on BTC-USD. It places multiple manual trades using strategy.order at specific timestamps and prices, with corresponding close conditions based on time. Some trades are long and some are s
The Enhanced DCA Strategy invests a fixed dollar amount at regular intervals (daily, weekly or monthly) into the asset after start date, deducting trading fees and tracking total invested, units acquired, current value, profit, ROI, Sharpe ratio, Sortino ratio
This strategy plots RSI on the price chart and enters a long when RSI falls below the oversold level or a short when it rises above the overbought level, only while flat. It exits with a take profit and stop loss measured in pips from the current close. Inputs
Greeffer's Scalping Strategy combines multi-timeframe Exponential Moving Averages, Bollinger Bands, and Donchian Channels to execute dip-buying trades directly on the price chart. It triggers long entries when price dips below both the lower Donchian Channel a
This strategy overlays trade setups directly on the price chart using fast, slow, and trend EMAs alongside RSI, ATR, ADX, and volume moving averages. It generates long and short signals through trend-pullback or mean-reversion logic, filtered across multiple t