A long-only strategy for crypto spot that builds support zones from pivot lows on a higher timeframe, 15 minutes by default, and watches the chart timeframe for a liquidity sweep below a swing low followed by a reclaim and a higher low.
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
Reclaim confirmation can use an engulfing candle, a volume spike and close strength. Optional filters include a higher-timeframe EMA trend check, an ADX ceiling, a session window and a manual pause switch. Higher-timeframe values are shifted to closed bars.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
HTF resolution
timeframe
15
htfRes
HTF pivot length (bars each side)
int
10
htfPivotLen
HTF confirm offset (0=live bar, 1=closed bar)
int
1
htfConfirmOffset
Size zones with ATR (off = %)
bool
true
useAtrZone
Zone half-width — ATR mult
float
0.5
zoneAtrMult
Zone half-width — % of price
float
0.25
zonePct
HTF ATR length
int
14
htfAtrLen
HTF trend filter (close > HTF EMA)
bool
true
useTrendFilter
HTF EMA length
int
200
htfEmaLen
HTF ADX ceiling filter
bool
false
useAdxFilter
ADX — DI length
int
14
adxDiLen
ADX — smoothing
int
14
adxSmooth
Show all 40 settings
Setting
Type
Default
Variable
Max HTF ADX
float
35.0
adxMax
LTF swing-low pivot length
int
5
ltfPivotLen
Setup expiry (bars after zone touch)
int
60
setupMaxBars
Max bars to reclaim swept level
int
5
reclaimMaxBars
Higher-low pivot length
int
2
hlPivotLen
Max bars from reclaim to HL
int
20
hlMaxBars
Require close above post-sweep high (strict MSS)
bool
false
requireMss
Bullish engulfing
bool
true
useEngulf
Volume spike
bool
true
useVolSpike
Volume MA length
int
20
volMaLen
Volume > MA x
float
1.5
volMult
Close strength (close in top X of range)
bool
true
useCloseStrength
Close strength ratio
float
0.6
closeStrength
⛔ PAUSE TRADING (manual news filter)
bool
false
pauseTrading
Enable session window
bool
false
useTimeFilter
Window start — hour (UTC)
int
9
sessStartHour
Window start — minute
int
30
sessStartMin
Window end — hour (UTC)
int
12
sessEndHour
Window end — minute
int
0
sessEndMin
Flatten when window closes
bool
false
closeOnSessionEnd
SL from ATR (off = %)
bool
true
useAtrSl
SL — ATR mult below sweep low
float
0.5
slAtrMult
SL — % below sweep low
float
0.30
slPct
LTF ATR length
int
14
ltfAtrLen
Skip trade if SL wider than % of price
float
2.0
maxSlPct
Take profit mode
string
Nearest (Swing High or RR)
tpMode
RR target
float
2.0
rrTarget
Skip trade if final RR below
float
1.2
minRr
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.
Gold Scalping BOS & CHoCH is an overlay strategy designed for detecting market structure shifts. It calculates rolling swing highs and lows to identify Break of Structure (BOS) and Change of Character (CHoCH) events. Long signals trigger when bullish BOS and C
Gold Scalping BOS & CHoCH with MA Filter is a strategy that identifies market structure shifts using Break of Structure (BOS) and Change of Character (CHoCH) signals alongside exponential moving average trend filters. Long trades enter when bullish BOS, bullis
This strategy plots on the price chart and trades fair value gaps filtered by RSI and two EMAs. It opens a long when a bullish gap, a rising candle, RSI below the oversold level, and price under both EMAs align, and a short on the opposite conditions. Each tra
This price-chart strategy measures the distance from the current price to the opposite end of the latest fair value gap and enters on the idea that price fills much of that gap. Take profit is set toward a large share of that distance, with a wider stop meant
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