OPEN-SOURCE SCRIPT

Trend Energy Divergence [JOAT]

747
Trend Energy Divergence [JOAT]

Introduction

TED Trend Energy Divergence is an open-source oscillator that measures trend energy from EMA spread, linear-regression slope, projected support/resistance pressure, confirmed structure, and pivot divergence.

The indicator is built for trend-quality context. It shows whether the current move has internal energy, whether structure agrees with that energy, and whether confirmed divergence is appearing against it.

snapshot

Core Concepts

1. Normalized EMA Spread
Fast and slow EMA spread is normalized by ATR so the oscillator adapts across symbols and timeframes.

2. Slope Pressure
Linear-regression slope contributes directional pressure to the energy model.

3. Projected Support and Resistance
Confirmed pivots build simple projected support and resistance references. Closing beyond those projections adds break pressure.

4. Confirmed Divergence
Pivot highs and lows are compared with oscillator values at the pivot offset to identify bullish or bearish divergence.

5. Energy Signal Line
Trend energy is smoothed and compared with a signal line to show positive or negative shifts.

Features

  • ATR-normalized energy: Adapts the oscillator to volatility
  • EMA and slope model: Blends trend spread and regression pressure
  • Structure-aware pressure: Adds support/resistance break pressure
  • Confirmed divergence: Uses confirmed pivots and offset oscillator values
  • Regime dashboard: Shows trend, expansion, or balance context
  • Projected levels: Displays pane-level support and resistance projections
  • Alerts: Includes bull shift, bear shift, and divergence confirmations


Input Parameters

Trend Engine:
  • Fast EMA
  • Slow EMA
  • Signal Smoothing
  • Energy Smoothing
  • ATR Length
  • Slope Length


Structure:
  • Pivot Left and Pivot Right
  • Structure Lookback
  • ADX/DMI Trend Threshold


How to Use

Step 1: Read the oscillator relative to the zero line and signal line.

Step 2: Treat upper/lower confirmation bands as higher-conviction energy zones.

Step 3: Watch divergence states as early warnings that the current move may be losing quality.

Step 4: Use the dashboard to confirm whether the environment is Trend, Expansion, or Balance.

Limitations

  • Divergence confirms after pivots confirm, so it is intentionally delayed
  • Oscillators can remain extended during strong trends
  • Projected support/resistance is model-based, not a guaranteed reaction point
  • The indicator is not a complete trade management system


Originality Statement

TED is an original JOAT oscillator combining ATR-normalized trend spread, slope, projected structure pressure, and confirmed divergence into one Pine Script v6 energy model.

Disclaimer

This script is for educational and informational purposes only. It is not financial advice and does not guarantee future results. Trading involves risk, and users should apply their own risk management.

Made with passion by jackofalltrades

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.