A strategy built on the same smart money concepts as its indicator sibling: swing structure, order blocks and fair value gaps scored into a confluence value that must pass a minimum before a trade.
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
Size is set from a risk percentage per trade, with an optional multiplier for stronger confluence. Stops and targets are ATR multiples, with an optional trailing stop and partial take profit. Loss limits cover daily, weekly, drawdown and consecutive losses, plus a maximum leverage and daily trade cap. Dashboard and alerts are included.
Confluence score gating entries
Risk-percent sizing with confluence multiplier
ATR stop, target, trailing stop and partial take profit
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Non-Repainting Mode
bool
true
i_nonRepaint
Show Dashboard
bool
true
i_showDashboard
Enable Alerts
bool
true
i_alertsOn
Risk Per Trade %
float
1.0
i_riskPerTrade
Max Daily Loss %
float
3.0
i_maxDailyLoss
Max Weekly Loss %
float
7.0
i_maxWeeklyLoss
Max Drawdown %
float
15.0
i_maxDrawdown
Max Consecutive Losses
int
5
i_maxConsecLosses
Max Trades Per Day
int
5
i_maxTradesPerDay
Max Leverage
float
5.0
i_maxLeverage
Use Confidence-Based Sizing
bool
true
i_useConfidenceSizing
Min Confluence for Trade
int
70
i_minConfForTrade
Show all 40 settings
Setting
Type
Default
Variable
Strong Confluence Threshold
int
85
i_strongConfThreshold
Strong Confluence Multiplier
float
1.5
i_strongConfMultiplier
ATR Multiplier for Stop Loss
float
2.0
i_atrMultiplierSL
ATR Multiplier for Take Profit
float
3.0
i_atrMultiplierTP
Use Trailing Stop
bool
true
i_useTrailingStop
Trail Activation (ATR)
float
1.5
i_trailActivation
Trail Offset (ATR)
float
1.0
i_trailOffset
Use Partial Take Profit
bool
true
i_usePartialTP
Partial TP %
float
50.0
i_partialTPPct
Partial TP Level (ATR)
float
1.5
i_partialTPLevel
Swing Detection Length
int
5
i_swingLength
Show Swing Points
bool
true
i_showSwings
Show BOS/CHOCH
bool
true
i_showBOS
Show Order Blocks
bool
true
i_showOB
Bullish OB Color
color
color.new(color.green, 80)
i_obBullColor
Bearish OB Color
color
color.new(color.red, 80)
i_obBearColor
Show Fair Value Gaps
bool
true
i_showFVG
Min FVG Size %
float
0.1
i_fvgMinSize
Bullish FVG Color
color
color.new(color.teal, 80)
i_fvgBullColor
Bearish FVG Color
color
color.new(color.maroon, 80)
i_fvgBearColor
Show Liquidity Levels
bool
true
i_showLiquidity
Liquidity Lookback
int
20
i_liqLookback
Show Liquidity Sweeps
bool
true
i_showLiqSweep
Liquidity Color
color
color.new(color.orange, 50)
i_liqColor
Show 50% Equilibrium
bool
true
i_show50Pct
Equilibrium Lookback
int
20
i_eqLookback
Equilibrium Color
color
color.new(color.purple, 50)
i_eqColor
Show PO3 Phases
bool
true
i_showPO3
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
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
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
FairValueGap C003 is an overlay strategy that identifies Fair Value Gaps (FVG) and opens trades expecting price to return and fill the gap. It calculates the distance between current price levels and recent gap boundaries to aim for partial or full gap fills.
SMC Strategy is a Pine Script v5 overlay strategy based on smart money concepts. It flags market structure shifts from ten-bar highs and lows, draws bullish and bearish order blocks as rectangles when that option is on, and marks liquidity sweeps with short li
This strategy identifies reversal opportunities based on liquidity sweeps and multi-gate confluence scoring. It evaluates setups using mandatory conditions such as swing sweeps, body and ATR filters, and dual EMA higher-timeframe trend alignment, alongside opt