OPEN-SOURCE SCRIPT
SMC Apex by Cruz

SMC Apex by Cruz is a Pine Script v5 indicator built on Smart Money Concepts methodology.
Order Blocks: Detects the last bearish or bullish candle before an impulsive move using a 14-bar swing lookback. These zones mark institutional entry areas where price is likely to react.
Fair Value Gaps: Identifies three-candle imbalances using a minimum gap size filter of 0.1% to remove noise. Highlights areas where price tends to return to fill inefficiencies.
Break of Structure: Confirms trend continuation when price closes beyond a previous swing high or low, validated by a 3-bar breakout confirmation filter.
Change of Character: Detects the first BOS against the prevailing trend using swing point analysis, signaling potential trend reversals.
EMA Trend Filter: Uses EMA 50 and EMA 200 to filter signals. Longs only above EMA 50, shorts only below EMA 50.
Signal Cooldown: 10-bar cooldown between signals to prevent overtrading. Maximum 6 signals per session.
Auto TP and SL: Calculates levels based on nearest order block distance with a minimum 3:1 RR ratio.
Best used on 1H timeframe on crypto and forex pairs.
Order Blocks: Detects the last bearish or bullish candle before an impulsive move using a 14-bar swing lookback. These zones mark institutional entry areas where price is likely to react.
Fair Value Gaps: Identifies three-candle imbalances using a minimum gap size filter of 0.1% to remove noise. Highlights areas where price tends to return to fill inefficiencies.
Break of Structure: Confirms trend continuation when price closes beyond a previous swing high or low, validated by a 3-bar breakout confirmation filter.
Change of Character: Detects the first BOS against the prevailing trend using swing point analysis, signaling potential trend reversals.
EMA Trend Filter: Uses EMA 50 and EMA 200 to filter signals. Longs only above EMA 50, shorts only below EMA 50.
Signal Cooldown: 10-bar cooldown between signals to prevent overtrading. Maximum 6 signals per session.
Auto TP and SL: Calculates levels based on nearest order block distance with a minimum 3:1 RR ratio.
Best used on 1H timeframe on crypto and forex pairs.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.