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
When price trades below it and a green candle closes back above, a stop-buy order is placed just above that candle's high. The stop sits under the signal candle with a buffer and size limits, and the target is a fixed reward-to-risk multiple. Optional break-even and trailing stop settings are included. Daily levels use closed daily bars only.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Reference higher timeframe
timeframe
D
htfRes
Track dynamic liquidity lows
bool
true
useDynamicLiq
Reset active level to PDL on each new day
bool
true
resetOnNewDay
Minimum sweep depth below level (%)
float
0.0
minSweepPct
Signal candle must close back above the level
bool
true
requireReclaim
Reclaim tolerance (%)
float
0.05
reclaimTolPct
Reject setups formed far above the level
bool
false
useProximity
Max signal-low distance above level (%)
float
0.50
maxDistPct
Re-anchor to a newer green candle while pending
bool
true
reArmOnNewGreen
Cancel un-triggered stop-buy after N bars
int
10
setupExpiry
Entry offset above signal high (ticks)
int
1
entryOffTicks
ATR length
int
14
atrLen
Show all 40 settings
Setting
Type
Default
Variable
SL buffer below signal low
string
Ticks
slBufMode
buffer — Percent
float
0.03
slBufPct
buffer — Ticks
int
2
slBufTicks
buffer — ATR ×
float
0.10
slBufAtr
MAX SL distance measured in
string
Percent
maxSlMode
Max SL distance — Percent
float
0.60
maxSlPct
Max SL distance — Ticks
int
150
maxSlTicks
Max SL distance — ATR ×
float
2.0
maxSlAtr
MIN SL distance (%)
float
0.02
minSlPct
Fixed R:R take profit
float
2.0
rr
Move SL to breakeven
bool
true
useBE
BE trigger (R multiple)
float
1.0
beTrigR
BE offset (R, covers fees)
float
0.05
beOffR
Enable trailing stop loss
bool
false
useTrailSL
Trail activates at (R multiple)
float
1.0
trailStartR
Trail method
string
ATR
trailMode
Trail — ATR ×
float
1.5
trailAtrMult
Trail — Percent
float
0.30
trailPct
Enable trailing take profit (run past target)
bool
false
useTrailTP
TP-trail method
string
ATR
tpTrailMode
TP-trail — ATR ×
float
1.0
tpTrailAtr
TP-trail — Percent
float
0.20
tpTrailPct
Size by risk % (off = 100 % of equity)
bool
false
useRiskSizing
Risk % of equity per trade
float
1.0
riskPct
Max trades per day
int
3
maxTradesDay
Max stop-loss hits per day
int
2
maxLossDay
Loss counter mode
string
Consecutive
lossMode
Restrict entries to a session
bool
false
useSession
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
This trading strategy detects key support and resistance zones on the price chart by identifying candle rejection wicks over a customizable lookback period. It filters potential trades using an Exponential Moving Average (EMA), Change in Status/Direction (CISD
This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto
This strategy plots the previous daily high and low on the price chart and calculates the Andean oscillator bull and bear components with an exponential moving average signal. It looks for a bull or bear cross of that signal, then confirms the setup against re
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 overlay strategy targets one-minute ATOM scalps. It tracks pivot highs and lows as resistance and support, compares a three-period EMA with a multi-stage smoothed close, and flags long or short when price crosses that curve in the matching direction. Dail