PROTECTED SOURCE SCRIPT
EMA Cross 5/21 with Accurate Break Triangles & Clean Prev OHLC

EMA Cross 5/21 with Structure Break & OHLC Levels
Purpose
This strategy combines EMA crossovers with market structure breakouts for more reliable trade signals.
It enhances trade context by plotting Previous Day and Previous Week key levels (Open, High, Low, Close), which are widely used for intraday decision-making.
Core Components
1. EMA Trend Filter
Uses a fast EMA (5) and a slow EMA (21).
Bullish bias: EMA 5 crosses above EMA 21.
Bearish bias: EMA 5 crosses below EMA 21.
EMA cross serves as the initial momentum shift signal.
2. Market Structure Break Confirmation
After an EMA cross, the script looks for a structure break within 3 candles:
Bullish Break: Price closes above the most recent swing high.
Bearish Break: Price closes below the most recent swing low.
Swing points are determined using a 3-bar lookback on each side.
This confirmation filters out false EMA crosses that occur during consolidation.
3. Entry Signal Visualization
Green triangle below the bar = Bullish structure break within 3 bars after bullish EMA cross.
Red triangle above the bar = Bearish structure break within 3 bars after bearish EMA cross.
These markers appear only when both EMA direction and structure break agree.
4. Key Market Levels (Support/Resistance)
The script automatically draws straight horizontal reference lines for:
Previous Day OHLC:
PDO – Previous Day Open (Blue)
PDC – Previous Day Close (Yellow)
PDH – Previous Day High (Red)
PDL – Previous Day Low (Green)
Previous Week OHLC (lighter shades):
PWO – Previous Week Open (Light Blue)
PWC – Previous Week Close (Light Yellow)
PWH – Previous Week High (Light Red)
PWL – Previous Week Low (Light Green)
These levels help traders identify:
Potential support/resistance zones.
High-probability breakout or reversal points.
Institutional liquidity levels.
Trading Logic
Wait for EMA cross to set bias (bullish or bearish).
Within 3 bars, check for a break of the last swing high/low in the direction of bias.
Plot signal (green triangle up for bullish, red triangle down for bearish).
Use PD/PW levels as confluence zones for entry, stop placement, or target setting.
Advantages
Filters out many false signals from simple EMA cross strategies.
Adds market structure awareness.
Automatically integrates important daily/weekly reference levels.
Signals are visually intuitive for faster decision-making.
Best Use Cases
Intraday trading: Using PD/PW levels for scalping or day trades.
Swing trading: Waiting for higher timeframe EMA cross + structure break confirmation.
Breakout trading: Combining PDH/PDL or PWH/PWL breaks with EMA confirmation.
Purpose
This strategy combines EMA crossovers with market structure breakouts for more reliable trade signals.
It enhances trade context by plotting Previous Day and Previous Week key levels (Open, High, Low, Close), which are widely used for intraday decision-making.
Core Components
1. EMA Trend Filter
Uses a fast EMA (5) and a slow EMA (21).
Bullish bias: EMA 5 crosses above EMA 21.
Bearish bias: EMA 5 crosses below EMA 21.
EMA cross serves as the initial momentum shift signal.
2. Market Structure Break Confirmation
After an EMA cross, the script looks for a structure break within 3 candles:
Bullish Break: Price closes above the most recent swing high.
Bearish Break: Price closes below the most recent swing low.
Swing points are determined using a 3-bar lookback on each side.
This confirmation filters out false EMA crosses that occur during consolidation.
3. Entry Signal Visualization
Green triangle below the bar = Bullish structure break within 3 bars after bullish EMA cross.
Red triangle above the bar = Bearish structure break within 3 bars after bearish EMA cross.
These markers appear only when both EMA direction and structure break agree.
4. Key Market Levels (Support/Resistance)
The script automatically draws straight horizontal reference lines for:
Previous Day OHLC:
PDO – Previous Day Open (Blue)
PDC – Previous Day Close (Yellow)
PDH – Previous Day High (Red)
PDL – Previous Day Low (Green)
Previous Week OHLC (lighter shades):
PWO – Previous Week Open (Light Blue)
PWC – Previous Week Close (Light Yellow)
PWH – Previous Week High (Light Red)
PWL – Previous Week Low (Light Green)
These levels help traders identify:
Potential support/resistance zones.
High-probability breakout or reversal points.
Institutional liquidity levels.
Trading Logic
Wait for EMA cross to set bias (bullish or bearish).
Within 3 bars, check for a break of the last swing high/low in the direction of bias.
Plot signal (green triangle up for bullish, red triangle down for bearish).
Use PD/PW levels as confluence zones for entry, stop placement, or target setting.
Advantages
Filters out many false signals from simple EMA cross strategies.
Adds market structure awareness.
Automatically integrates important daily/weekly reference levels.
Signals are visually intuitive for faster decision-making.
Best Use Cases
Intraday trading: Using PD/PW levels for scalping or day trades.
Swing trading: Waiting for higher timeframe EMA cross + structure break confirmation.
Breakout trading: Combining PDH/PDL or PWH/PWL breaks with EMA confirmation.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.