OPEN-SOURCE SCRIPT
已更新 SMC and FVG and EMAs

The Smart Money Concept (SMC) revolves around understanding how institutional traders—banks, hedge funds, and other large players—move the market. It’s not just about price action; it’s about decoding the intent behind price movements. Here's a breakdown of the core SMC market structure logic:
Core Principles of SMC Market Structure
1. Market Structure Shifts (Break of Structure - BOS / Change of Character - CHoCH)
BOS (Break of Structure): Occurs when price breaks a previous swing high/low, signaling continuation of trend.
CHoCH (Change of Character): Indicates a potential reversal when price breaks against the prevailing trend.
2. Liquidity Pools
Institutions target areas where retail traders place stop-losses:
Buy-side liquidity (BSL): Above swing highs.
Sell-side liquidity (SSL): Below swing lows.
These zones are often swept before a reversal or continuation.
3. Order Blocks (OB)
The last bullish or bearish candle before a strong move.
Acts as a zone of institutional interest—price often returns here before continuing.
-------
🧱 What Is an Order Block?
An Order Block (OB) is the last bullish or bearish candle before a significant price move—usually caused by institutional buying or selling. It represents a zone where smart money placed large orders, and price often returns to this area to "mitigate" or fill leftover orders.
Think of it as a footprint left by big players before they push the market in a new direction.
Types of Order Blocks
Type Description
Bullish OB Last bearish candle before a strong upward move
Bearish OB Last bullish candle before a strong downward move
Mitigated OB Price revisits the OB and reacts (fills unexecuted orders)
Unmitigated OB Price hasn’t returned to the OB yet—potential future reaction zone
How to Identify an Order Block
Find a strong impulsive move (break of structure or liquidity sweep).
Look back to the last opposite candle before that move.
Mark the zone from the candle’s open to close (some traders include wicks).
Wait for price to return to this zone—this is where smart money may re-enter.
Why Are Order Blocks Powerful?
They reveal institutional intent.
Price often respects these zones—either bouncing or consolidating.
They offer high-probability entries with tight stop-losses and strong risk-reward setups.
xample in Practice
Imagine price drops sharply after a bullish candle. That bullish candle is likely a bearish order block—institutions sold heavily right after it. When price returns to that candle’s zone, it may reject again, giving you a short setup.
4. Mitigation
Price revisits an order bblock to “mitigate” unfilled orders.
This is where smart money re-enters the market.
5. Fair Value Gaps (FVG)
Imbalance between buyers and sellers.
Price tends to fill these gaps before resuming direction.
6. Entry Models
Common setups include:
Liquidity sweep → Break of Structure → Retest of Order Block
CHoCH → Retest → Entry with confirmation
Example Flow in Bullish SMC Structure
Liquidity sweep below a swing low.
CHoCH as price breaks a minor high.
Retest of bullish order block or FVG.
Entry confirmation (e.g., bullish engulfing, lower timeframe BOS).
SMC helps traders align with institutional flow rather than getting trapped by retail patterns. It’s about trading with the market makers, not against them.
Target: Previous swing high or next liquidity pool.
Core Principles of SMC Market Structure
1. Market Structure Shifts (Break of Structure - BOS / Change of Character - CHoCH)
BOS (Break of Structure): Occurs when price breaks a previous swing high/low, signaling continuation of trend.
CHoCH (Change of Character): Indicates a potential reversal when price breaks against the prevailing trend.
2. Liquidity Pools
Institutions target areas where retail traders place stop-losses:
Buy-side liquidity (BSL): Above swing highs.
Sell-side liquidity (SSL): Below swing lows.
These zones are often swept before a reversal or continuation.
3. Order Blocks (OB)
The last bullish or bearish candle before a strong move.
Acts as a zone of institutional interest—price often returns here before continuing.
-------
🧱 What Is an Order Block?
An Order Block (OB) is the last bullish or bearish candle before a significant price move—usually caused by institutional buying or selling. It represents a zone where smart money placed large orders, and price often returns to this area to "mitigate" or fill leftover orders.
Think of it as a footprint left by big players before they push the market in a new direction.
Types of Order Blocks
Type Description
Bullish OB Last bearish candle before a strong upward move
Bearish OB Last bullish candle before a strong downward move
Mitigated OB Price revisits the OB and reacts (fills unexecuted orders)
Unmitigated OB Price hasn’t returned to the OB yet—potential future reaction zone
How to Identify an Order Block
Find a strong impulsive move (break of structure or liquidity sweep).
Look back to the last opposite candle before that move.
Mark the zone from the candle’s open to close (some traders include wicks).
Wait for price to return to this zone—this is where smart money may re-enter.
Why Are Order Blocks Powerful?
They reveal institutional intent.
Price often respects these zones—either bouncing or consolidating.
They offer high-probability entries with tight stop-losses and strong risk-reward setups.
xample in Practice
Imagine price drops sharply after a bullish candle. That bullish candle is likely a bearish order block—institutions sold heavily right after it. When price returns to that candle’s zone, it may reject again, giving you a short setup.
4. Mitigation
Price revisits an order bblock to “mitigate” unfilled orders.
This is where smart money re-enters the market.
5. Fair Value Gaps (FVG)
Imbalance between buyers and sellers.
Price tends to fill these gaps before resuming direction.
6. Entry Models
Common setups include:
Liquidity sweep → Break of Structure → Retest of Order Block
CHoCH → Retest → Entry with confirmation
Example Flow in Bullish SMC Structure
Liquidity sweep below a swing low.
CHoCH as price breaks a minor high.
Retest of bullish order block or FVG.
Entry confirmation (e.g., bullish engulfing, lower timeframe BOS).
SMC helps traders align with institutional flow rather than getting trapped by retail patterns. It’s about trading with the market makers, not against them.
Target: Previous swing high or next liquidity pool.
版本注释
adding ob开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。