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
SMC Major Pairs Strategy calculates a customized Q-Trend filter combined with higher-timeframe trend confirmation, liquidity sweep detection, swing points, and fair value gaps. Position sizing uses dynamic tiered risk percentages based on account equity, partial take-profits at multiple R-multiples, and an ATR trailing stop. Designed to overlay on the price chart, it features entry and exit labels, daily trade caps, and an optional status dashboard.
Multi-timeframe Q-Trend alignment filter
SMC liquidity sweep and fair value gap detection
Tiered risk-based position sizing and ATR trailing stop
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Trading Mode
string
Swing
mode
Higher Timeframe
timeframe
60
htf_res
Q-Trend Period
int
100
trend_len
ATR Period
int
14
atr_period
Q-Trend ATR Mult
float
0.8
atr_mult
Volatility Lookback
int
100
vol_period
Min Volatility Percentile
float
10
vol_lower
Max Volatility Percentile
float
90
vol_upper
Swing Lookback Left
int
10
lb_left
Swing Lookback Right
int
10
lb_right
Sweep Cooldown
int
5
cooldown
Require FVG not mitigated
bool
false
fvg_mitigation
Show all 28 settings
Setting
Type
Default
Variable
Trend Duration Samples
int
5
dur_samples
Duration Threshold %
float
0.80
dur_threshold
Risk % (Equity < $500)
float
2.0
risk_tier1
Risk % ($500-$2000)
float
1.5
risk_tier2
Risk % (>$2000)
float
1.0
risk_tier3
TP1 (R)
float
1.5
tp1_r
TP2 (R)
float
2.5
tp2_r
TP1 Close %
float
70
tp1_close
Trailing Stop ATR
float
1.5
trail_atr
Max Trades per Day
int
5
max_trades_per_day
Pyramid Risk Reduction %
float
50
pyramid_reduce
Show Dashboard
bool
true
show_dashboard
Dashboard Position
string
Top Right
dashboard_position
Show Entry/SL/TP Labels
bool
true
show_signal_labels
Bullish Color
color
#089981
color_bull
Bearish Color
color
#f23645
color_bear
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 identifies trend reversals through market structure changes (CHoCH) filtered by MACD momentum. It initiates long positions on bullish structure breaks when MACD is positive and above its signal line, and short positions on bearish breaks when MAC
This strategy is titled for Bitcoin on the four-hour chart and is set to draw on the price chart. It detects three-candle fair value gaps and inverted gaps, and it defines a check for price near a gap midpoint within a percentage tolerance. An optional filter
This overlay strategy combines EMA trend following with simple Smart Money Concepts filters. It reads H4 and H1 bias, then looks for a liquidity sweep plus a displacement candle in that direction, gated by ADX, ATR, and volume. Entries are allowed only in Lond
This overlay strategy estimates trend with a selectable TEMA, Hull, or ALMA basis and optional higher-timeframe or Heikin Ashi sources. It plots a regression estimator with ATR near and far boundaries, can color bars by trend, and can show order blocks. Entrie
This strategy draws on the price chart and sizes positions from account equity, a risk percent, and a leverage multiplier. It tracks long and short stops, pending add-on entries, limit and stop order offsets, and a percentage profit target. Settings change lin
This market structure strategy identifies trading opportunities using Change of Character (CHoCH) gates, liquidity sweeps, and structural breaks. It combines exponential moving averages, RSI, and ATR volatility filters, with optional higher-timeframe trend che