PROTECTED SOURCE SCRIPT
FIB 21/8 EMA Logic HyperTrend w/ ATR Bands & Buy/Sell Indicators

EMA LOGIC SUPERTREND
────────────────────────────────────────────
EMA Logic SuperTrend is a SuperTrend-style overlay that replaces traditional
price/ATR trend logic with a stateful, debounced EMA momentum engine.
It preserves the classic SuperTrend visuals:
- Trend bands
- Buy/Sell markers
- Background shading
But ALL trend direction is determined strictly by EMA behavior.
────────────────────────────────────────────
CORE TREND LOGIC
────────────────────────────────────────────
• Uses two EMAs (default: 8 & 21)
• GREEN (Buy Trend):
- Both EMAs rising for 2 consecutive candles
• RED (Sell Trend):
- Fast EMA falling for 2 consecutive candles
• Includes a 2-bar debounce filter to reduce whipsaw
• Uses a state machine for clean flips:
- Buy only on RED → GREEN
- Sell only on GREEN → RED
────────────────────────────────────────────
ATR BANDS (VISUAL ONLY)
────────────────────────────────────────────
• ATR is NOT used for entries or exits
• ATR ONLY controls how far the bands sit from price
• High volatility → wider bands
• Low volatility → tighter bands
• Green band = visual support guide
• Red band = visual resistance guide
────────────────────────────────────────────
VISUAL FEATURES
────────────────────────────────────────────
• SuperTrend-style trend bands
• Translucent background shading
• Buy/Sell labels shifted back one candle
• Adjustable band opacity
• Optional signal labels
• Optional background highlighting
────────────────────────────────────────────
ADJUSTABLE INPUTS
────────────────────────────────────────────
• Fast EMA Length (default: 8)
• Slow EMA Length (default: 21)
• ATR Period
• ATR Multiplier
• Band Opacity
• Show/Hide Buy & Sell Labels
• Show/Hide Background Highlighting
────────────────────────────────────────────
BEST USED FOR
────────────────────────────────────────────
• EMA-based trend following
• Momentum regime confirmation
• Clean directional bias
• Trend continuation trading
• Visual volatility-aware support/resistance
────────────────────────────────────────────
IMPORTANT NOTES
────────────────────────────────────────────
• This indicator does NOT use standard SuperTrend logic
• Price crossing the bands does NOT trigger signals
• ATR does NOT affect trade direction
• All trend changes are EMA-driven
────────────────────────────────────────────
────────────────────────────────────────────
EMA Logic SuperTrend is a SuperTrend-style overlay that replaces traditional
price/ATR trend logic with a stateful, debounced EMA momentum engine.
It preserves the classic SuperTrend visuals:
- Trend bands
- Buy/Sell markers
- Background shading
But ALL trend direction is determined strictly by EMA behavior.
────────────────────────────────────────────
CORE TREND LOGIC
────────────────────────────────────────────
• Uses two EMAs (default: 8 & 21)
• GREEN (Buy Trend):
- Both EMAs rising for 2 consecutive candles
• RED (Sell Trend):
- Fast EMA falling for 2 consecutive candles
• Includes a 2-bar debounce filter to reduce whipsaw
• Uses a state machine for clean flips:
- Buy only on RED → GREEN
- Sell only on GREEN → RED
────────────────────────────────────────────
ATR BANDS (VISUAL ONLY)
────────────────────────────────────────────
• ATR is NOT used for entries or exits
• ATR ONLY controls how far the bands sit from price
• High volatility → wider bands
• Low volatility → tighter bands
• Green band = visual support guide
• Red band = visual resistance guide
────────────────────────────────────────────
VISUAL FEATURES
────────────────────────────────────────────
• SuperTrend-style trend bands
• Translucent background shading
• Buy/Sell labels shifted back one candle
• Adjustable band opacity
• Optional signal labels
• Optional background highlighting
────────────────────────────────────────────
ADJUSTABLE INPUTS
────────────────────────────────────────────
• Fast EMA Length (default: 8)
• Slow EMA Length (default: 21)
• ATR Period
• ATR Multiplier
• Band Opacity
• Show/Hide Buy & Sell Labels
• Show/Hide Background Highlighting
────────────────────────────────────────────
BEST USED FOR
────────────────────────────────────────────
• EMA-based trend following
• Momentum regime confirmation
• Clean directional bias
• Trend continuation trading
• Visual volatility-aware support/resistance
────────────────────────────────────────────
IMPORTANT NOTES
────────────────────────────────────────────
• This indicator does NOT use standard SuperTrend logic
• Price crossing the bands does NOT trigger signals
• ATR does NOT affect trade direction
• All trend changes are EMA-driven
────────────────────────────────────────────
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。