Star SMC and Price action [ARule]This script is a Smart Money Concepts (SMC) + Price Action + VWAP + Swing Zones indicator.
It detects and draws:
โ
Fair Value Gaps (FVG)
โ
Imbalances (HTF FVG)
โ
BOS / CHoCH (Market Structure)
โ
Internal & Swing Structure
โ
Order Blocks (Internal + Swing)
โ
Equal High / Equal Low (EQH / EQL)
โ
Premium / Discount Zones
โ
Multi-Timeframe High & Low levels
โ
VWAP trend filter
โ
Swing High / Low zones with volume/count filter
โ
Alerts for all major SMC events
๐ Basically:
๐ โAll-in-one institutional trading indicatorโ
โ
1) HTF FVG / Imbalance System (First Part)
This part:
Uses multiple higher timeframes:
5m, 15m, 1H, 4H, 1D, 1W
Detects imbalance (FVG-like gaps)
Draws boxes on chart
Marks mitigated zones
Adds labels like: 5m, 15m, 1H etc.
Logic:
An imbalance forms when:
current high < previous low (gap down)
or
current low > previous high (gap up)
Then it draws a box ๐ฆ
โ
2) Mitigation Logic (Very Important)
Your script checks when FVG is filled:
Options:
Wick filled
Body filled
Half filled
None
Example:
"Wick filled" => low <= imb.open
Meaning:
๐ Price touched the FVG โ mark as mitigated.
โ
3) Smart Money Concepts (SMC Core)
This huge section detects:
๐น BOS (Break of Structure)
When price breaks previous swing high/low.
๐น CHoCH (Change of Character)
Trend reversal signal.
Example:
Uptrend โ break low โ CHoCH bearish
Downtrend โ break high โ CHoCH bullish
โ
4) Internal vs Swing Structure
Internal Structure:
Small moves (lower timeframe)
Fast signals โก
Swing Structure:
Major trend structure
Strong signals ๐ช
You can enable/disable both in settings.
โ
5) Order Blocks (OB)
Detected when structure breaks.
Two types:
๐ข Bullish OB
๐ด Bearish OB
Logic:
Script finds last opposite candle before BOS/CHoCH.
Then draws OB box ๐ฆ
Also checks mitigation:
close > OB high โ bearish OB broken
close < OB low โ bullish OB broken
โ
6) Equal High / Equal Low (Liquidity)
Detects liquidity zones:
EQH = Equal High
EQL = Equal Low
Logic:
If two highs/lows are close within ATR threshold.
Used for:
๐ Liquidity grab / stop hunt zones.
โ
7) Fair Value Gaps (FVG) โ Another System
This is separate from HTF imbalance.
Condition:
currentLow > high โ bullish FVG
currentHigh < low โ bearish FVG
Draws 2 boxes per FVG.
โ
8) Premium / Discount Zones
Based on latest swing high & low:
Premium zone = top 50%
Discount zone = bottom 50%
Equilibrium = middle
Used in SMC for entries.
โ
9) Multi-Timeframe High/Low Levels
Draws:
Previous Day High/Low
Previous Week High/Low
Previous Month High/Low
โ
10) VWAP Filter (Your Added Block)
You added:
VWAP Line
vwapValue = ta.vwap(close)
Trend Filter
Bullish โ price above VWAP
Bearish โ price below VWAP
ATM / ITM / OTM logic
atm_condition = abs(close - vwap) <= 25
Meaning:
ATM = price near VWAP
ITM / OTM = based on VWAP direction
๐ก This is NOT real option ATM โ it's a conceptual filter.
โ
11) Swing High / Low Zones (Last Part)
This part:
Detects swing highs & lows using pivot logic
Creates zones (boxes)
Counts touches or volume inside zone
Filters strong zones
Example:
More touches = stronger support/resistance
More volume = institutional interest
โ
What makes this script powerful ๐
It combines:
Concept Purpose
FVG / Imbalance Institutional gaps
BOS / CHoCH Trend change
Order Blocks Smart money zones
EQH/EQL Liquidity
Premium/Discount Entry zones
VWAP Trend filter
Swing Zones Support/Resistance
๐ This is almost like ICT + SMC + Volume + VWAP hybrid.
โ
If you want, I can help you:
I can:
โ
Simplify this script (remove heavy parts)
โ
Add NIFTY / BANKNIFTY option logic
โ
Add Buy/Sell signals
โ
Add scanner (BOS + VWAP + FVG)
โ
Add dashboard table
โ
Optimize performance (reduce lag)
โ
Convert VWAP โ real ATM strike logic
โ
Explain any part line-by-line
Penunjuk Pine Scriptยฎ






















