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
────────────────────────────────────────────
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน