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 Scalping State Engine v2.2.1 uses a state transition system to detect market structure breaks, order blocks, fair value gaps, key levels and EMA alignments for entry signals on the 1M timeframe. The strategy requires confluence conditions such as internal and external swing alignments and trend strength gates before opening positions. Users can toggle visibility of dashboard, structure, order blocks, FVGs, levels, VWAP bands and EMAs through input settings. Main settings control trading mode between strict ICT and statistical styles, alignment requirements, swing lookbacks, ATR-based filters and maximum active order blocks.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Show State Dashboard
bool
true
i_showDashboard
Show Market Structure
bool
true
i_showStructure
Show Order Blocks
bool
true
i_showOrderBlocks
Show Fair Value Gaps
bool
true
i_showFVGs
Show Key Session Levels
bool
true
i_showKeyLevels
Show VWAP & Bands
bool
true
i_showVWAP
Show EMAs
bool
true
i_showEMAs
Show Optimization Plots
bool
false
i_showOptimizePlots
Enable Debug Mode
bool
false
i_debugMode
Show Debug Labels on Chart
bool
false
i_debugLabels
Show State Change Debug
bool
true
i_debugStateChanges
Entry Style
string
Strict ICT
i_tradingMode
Show all 40 settings
Setting
Type
Default
Variable
Require HTF Alignment (5M)
bool
false
i_requireHTFAlignment
HTF Timeframe
timeframe
5
i_htfTimeframe
External Swing Lookback
int
5
i_swingLookback
Internal Swing Lookback
int
2
i_internalLookback
Require Internal + External Alignment
bool
true
i_requireInternalAlign
Alignment Window (bars)
int
5
i_alignmentBars
Min BOS Break Distance (ATR)
float
0.3
i_bosMinATR
OB Formation Sensitivity (ATR)
float
0.5
i_structureSensitivity
Max Active Order Blocks
int
5
i_maxOrderBlocks
OB Mitigation Mode
string
Wick
i_obMitigationMode
Fast EMA Period
int
20
i_emaFast
Slow EMA Period
int
50
i_emaSlow
Require EMA Stack Alignment
bool
true
i_requireEMAStack
Require Price vs EMA Alignment
bool
true
i_requirePriceAboveEMA
Use Trend Strength Gate
bool
true
i_useTrendStrengthGate
Min EMA Separation (ATR)
float
0.35
i_emaSepMinATR
Require EMA Slope Alignment
bool
true
i_emaSlopeCheck
Slope Lookback Bars
int
3
i_slopeLookback
Sweep Anchor
string
Known Pools
i_sweepSource
Lookback Window (if used)
int
10
i_liqSweepLookback
Require Displacement
bool
true
i_requireDisplacement
Displacement Size (ATR)
float
0.5
i_displacementATR
Require Price Reclaim
bool
true
i_requireReclaim
Prevent Sweep Clustering
bool
true
i_preventClustering
Cluster Cooldown (bars)
int
10
i_clusterCooldown
Invalidate on Adverse Penetration
bool
true
i_invalidateOnPenetration
Entry Confirmation
string
Engulfing
i_confirmationType
Entry Timeout (bars)
int
10
i_entryTimeoutBars
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 futures trading strategy combines Fair Value Gap (FVG) detection filtered by Average True Range (ATR) with multi-timeframe Exponential Moving Averages (8, 55, and 165 lengths). It identifies entry setups during a defined intraday trading session window wh
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
FilledValueGap E002 is a trading strategy that enters positions opposite to the direction of a filled value gap, operating on the premise that the prevailing trend will resume after gap completion. It utilizes Curie closing moving averages as trend filters to
This multi-timeframe scalping strategy plots moving averages alongside Smart Money Concepts elements on the price chart. It calculates trend signals using configurable moving average types like ALMA, Hull MA, or TEMA across alternate timeframes. It also plots
The Breaker Block strategy identifies failed Smart Money Concepts (SMC) order blocks and trades their retests. It uses an ATR impulse condition to detect bullish and bearish order blocks, tracking when price breaks through them. When price retests a broken ord
This strategy overlays trend, momentum, and simplified Smart Money Concepts (SMC) directly on the price chart. It evaluates market conditions using triple EMAs (20, 50, 200), MACD crossovers, RSI levels, and volume moving averages alongside simplified order bl