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
XAUUSD LiqSweep+MSS+VP System identifies key liquidity levels—such as previous day highs and lows, session levels, swings, and equal highs or lows—and waits for confirmed liquidity sweeps. Following a sweep, it tracks market structure shifts (MSS) and displacement, executing long or short entries upon volume profile retests. Exits utilize configurable structural or ATR stop losses, take-profit targets, or session-end closes. Visuals plot liquidity lines, session backgrounds, and an on-chart status dashboard.
Liquidity sweep detection across swings, daily, and session extremes
Market structure shift and displacement confirmation
Volume profile retest engine with POC, VAH, and VAL tracking
Session time filters with optional end-of-session position closing
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
HTF Context Timeframe
timeframe
15
i_htfTF
ATR Length
int
14
i_atrLen
Show Timeframe Warning
bool
true
i_showTFWarning
NY Session Start (HHMM)
string
0930
i_nyStart
NY Session End (HHMM)
string
1600
i_nyEnd
London Start (HHMM ET)
string
0300
i_lonStart
London End (HHMM ET)
string
1200
i_lonEnd
Asia Start (HHMM ET)
string
2000
i_asiaStart
Asia End (HHMM ET)
string
0400
i_asiaEnd
Timezone
string
America/New_York
i_tz
Trade NY Session
bool
true
i_useNY
Trade London Session
bool
false
i_useLondon
Show all 40 settings
Setting
Type
Default
Variable
Trade Asia Session
bool
false
i_useAsia
Close Positions at Session End
bool
true
i_sessionClose
HTF Swing Length
int
5
i_htfSwingLen
Bias Lookback (# swings)
int
4
i_htfBiasLookback
Require HTF Bias Alignment
bool
true
i_requireHTFBias
Liquidity Swing Length
int
5
i_liqSwingLen
Equal H/L Tolerance (×ATR)
float
0.15
i_eqTolATR
Max Tracked Levels
int
20
i_maxLiqLevels
Track PDH/PDL
bool
true
i_usePDHL
Track Session H/L
bool
true
i_useSessionHL
Track Swing H/L
bool
true
i_useSwingHL
Track Equal H/L
bool
true
i_useEqualHL
Min Sweep Distance (×ATR)
float
0.1
i_minSweepATR
Max Sweep Distance (×ATR)
float
3.0
i_maxSweepATR
Require Price Reclaim
bool
true
i_sweepReclaim
Min Wick Ratio
float
0.3
i_minWickRatio
MSS Swing Length
int
3
i_mssSwingLen
Min Break Distance (×ATR)
float
0.2
i_mssMinBreak
Require Close Confirmation
bool
true
i_mssCloseConf
MSS Timeout (bars)
int
15
i_mssTimeout
Require Displacement
bool
true
i_requireDisp
Body Size (×ATR)
float
0.8
i_dispBodyATR
Min Body/Range Ratio
float
0.55
i_dispBodyRatio
Enable Volume Profile
bool
true
i_enableVP
VP Bucket Count
int
30
i_vpBuckets
Value Area (%)
float
70.0
i_vpVAPct
Range Buffer (%)
float
0.5
i_vpRangeBuf
HVN Threshold (×avg)
float
1.5
i_hvnMult
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 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
P404 Smoke is a price-chart strategy that sequences an optional higher-timeframe EMA bias, a liquidity range from recent pivots, a sweep of buy-side or sell-side liquidity, and a market structure shift within a set bar window. Comments state it then looks for
This ICT-based strategy trades during the 9:45 AM to 10:15 AM New York session window. It calculates a daily bias using a 20-period daily EMA and tracks previous day highs and lows to identify liquidity sweeps. The script refines order block entry levels and m
This strategy identifies Wyckoff consolidation ranges directly on the price chart to trade potential spring and upthrust events. It calculates highest highs and lowest lows over a customizable lookback period, filtering setups by average volume spikes and ATR
This strategy combines Opening Range Breakout (ORB) mechanics with Inner Circle Trader (ICT) concepts like Fair Value Gaps, Order Blocks, and liquidity grabs. It identifies session opening ranges and generates signals when price breaks out with supporting rela
Brucetrade Mechanical Framework is an overlay strategy combining higher-timeframe bias with Smart Money Concepts (SMC). It detects Fair Value Gaps (FVG), Inverted FVGs, and liquidity sweeps across configurable higher and momentum timeframes. Signals are filter