Strategy · Pine Script v5 · On the chart

SMC Scalping State Engine v2.2.1

by alboogycOdR

SMC Scalping State Engine v2.2.1 is a Pine Script v5 strategy that plots Smart Money Concepts elements on the XAUUSD price chart.

View on GitHub

GitHub stars6on the repository
Pine versionv5runs as is
Lines of code1,584
Settings40inputs
LicenceNone stated
Last update7 months ago16 Mar 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 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.

Details

Published by

alboogycOdR on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

SMC / ICT / price action, Trend, Moving averages

Markets

Gold

Timeframes

M1-M5

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Show State Dashboardbooltruei_showDashboard
Show Market Structurebooltruei_showStructure
Show Order Blocksbooltruei_showOrderBlocks
Show Fair Value Gapsbooltruei_showFVGs
Show Key Session Levelsbooltruei_showKeyLevels
Show VWAP & Bandsbooltruei_showVWAP
Show EMAsbooltruei_showEMAs
Show Optimization Plotsboolfalsei_showOptimizePlots
Enable Debug Modeboolfalsei_debugMode
Show Debug Labels on Chartboolfalsei_debugLabels
Show State Change Debugbooltruei_debugStateChanges
Entry StylestringStrict ICTi_tradingMode
Show all 40 settings
SettingTypeDefaultVariable
Require HTF Alignment (5M)boolfalsei_requireHTFAlignment
HTF Timeframetimeframe5i_htfTimeframe
External Swing Lookbackint5i_swingLookback
Internal Swing Lookbackint2i_internalLookback
Require Internal + External Alignmentbooltruei_requireInternalAlign
Alignment Window (bars)int5i_alignmentBars
Min BOS Break Distance (ATR)float0.3i_bosMinATR
OB Formation Sensitivity (ATR)float0.5i_structureSensitivity
Max Active Order Blocksint5i_maxOrderBlocks
OB Mitigation ModestringWicki_obMitigationMode
Fast EMA Periodint20i_emaFast
Slow EMA Periodint50i_emaSlow
Require EMA Stack Alignmentbooltruei_requireEMAStack
Require Price vs EMA Alignmentbooltruei_requirePriceAboveEMA
Use Trend Strength Gatebooltruei_useTrendStrengthGate
Min EMA Separation (ATR)float0.35i_emaSepMinATR
Require EMA Slope Alignmentbooltruei_emaSlopeCheck
Slope Lookback Barsint3i_slopeLookback
Sweep AnchorstringKnown Poolsi_sweepSource
Lookback Window (if used)int10i_liqSweepLookback
Require Displacementbooltruei_requireDisplacement
Displacement Size (ATR)float0.5i_displacementATR
Require Price Reclaimbooltruei_requireReclaim
Prevent Sweep Clusteringbooltruei_preventClustering
Cluster Cooldown (bars)int10i_clusterCooldown
Invalidate on Adverse Penetrationbooltruei_invalidateOnPenetration
Entry ConfirmationstringEngulfingi_confirmationType
Entry Timeout (bars)int10i_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.

Similar Pine Scripts

Try Trading Future

by dearvn
257 stars

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

Strategy v5 SMC / ICT / price actionMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Try Trading Future

FilledValueGap E002

by ruckard
13 stars

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

Strategy v5 SMC / ICT / price actionTrend
Updated 1 year ago · None stated GitHub repository of FilledValueGap E002

XXX

by MeridianAlgo
9 stars

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

Strategy v5 TrendMoving averages Repaints
Updated 4 months ago · MIT GitHub repository of XXX

Breaker Block

by muammeryldrm42
7 stars

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

Strategy v5 SMC / ICT / price actionTrend
Updated 3 months ago · MIT GitHub repository of Breaker Block

AI Trading Bot - 19 Modules

by thanhcong1211
3 stars

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

Strategy v5 SMC / ICT / price actionTrend
Updated 3 months ago · None stated GitHub repository of AI Trading Bot - 19 Modules

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers