INVITE-ONLY SCRIPT
Atualizado

Eclipse Trend Oracle

107
📌 Overview

The Eclipse Trend Oracle is a trend-following tool used to gauge the direction of the trend, built off the volatility-calibrated ATR. It uses a Lévy Process framework to account for sudden market jumps and fat-tailed distributions that traditional Gaussian models miss.

Modes:
  • Self-Tuning: Tunes to the timeframe you are currently on. No need to fiddle with numbers
  • Rapid: Responds rapidly to price movements while not whipsawing out of trades constantly
  • Absolute: If you want a clear interpretation of the trend without any fakeouts, absolute is your man
  • Manual: Choose a manual length

Features:
  • Trend Line: This is the Levy-Process calculated ATR. A long/short signal does not mean to long/short. It simply is informing the user there is an official change in trend
  • Oracle Reversals: Shows reversals near the trend oracle, denoted by 'TO-R'

🔬 Calculation of Eclipse Trend Oracle

The indicator calculates adaptive bands around price using a modified ATR that incorporates jump components - specifically employing a Variance Gamma process to model both continuous price diffusion and discontinuous jumps. When price breaks above the upper band, it signals an upward trend with momentum sufficient to overcome the jump-adjusted volatility threshold. Conversely, breaks below the lower band indicate downward trending conditions.

The volatility calibration adjusts the ATR multiplier based on the estimated jump intensity parameter from the Lévy process, making the bands tighter during stable periods and wider when jump risk increases. This creates a self-adjusting trend filter that expands and contracts based on the market's structural volatility characteristics rather than just recent price movement.

Pine Script®
returns = log(price / price_previous) volatility = stdev(returns, period) threshold = volatility * jump_sensitivity if |returns| > threshold: jump = returns continuous = 0 else: jump = 0 continuous = returns levy_process += drift + continuous + jump


where
  • returns - The logarithmic return measuring percentage change from previous price to current price
  • volatility - The standard deviation of recent returns, capturing typical market fluctuation size
  • threshold - The boundary value that separates normal price movements from abnormal jumps
  • jump_sensitivity - User-defined parameter controlling how easily movements are classified as jumps (higher = fewer jumps detected)
  • jump - The component of returns attributed to sudden discontinuous price movements
  • continuous - The component of returns attributed to normal gradual price diffusion
  • drift - The directional bias or trend component added to the process
  • levy_process - The cumulative sum tracking the total path of drift, continuous moves, and jumps over time


🔍 How to use it

There are 2 ways to trade it.

Method 1: Using the Trend Oracle. You simply decide your mode, then wait for a trend change. Once the trend becomes bullish with a 'Longs' symbol, you wait for dips. Use our other Eclipse Tools like Eclipse Reversals or LLNR to locate dips effectively.
  • Self-Tuning: Best fit overall. Tunes to the timeframe
  • Rapid: If you want the script to respond quickly, at the expense of more fakeouts
  • Absolute: Our favourite. If you want a no-nonsense trend, this is your go-to
  • Manual: Choose a manual length


snapshot

Method 2: Using the Trend Oracle's Reversals (checked in 'General Settings'). This allows you to directly use reversals near the Eclipse Trend Oracle to find dips in a downtrend and failed rallies in an uptrend.

snapshot

Why it's original

A trend-following script using a Lévy process is original because it addresses fundamental limitations in traditional indicators. Most trend tools assume continuous, smooth price movements following Gaussian distributions, which causes them to fail during market crashes, gaps, and sudden reversals.

The Lévy process framework explicitly models discontinuous jumps and fat-tailed distributions, capturing the reality that extreme market events occur far more frequently than normal distributions predict. This makes the indicator inherently more robust during the volatile conditions where traders need reliable signals most.

The key innovation lies in separating jump components from drift components. While traditional ATR-based indicators treat all volatility the same way, the Lévy framework distinguishes between normal trending movement (continuous diffusion) and abnormal market shocks (jump events).

🚨 Alerts

The script contains 4 alerts:
  1. Trend Oracle Long Trend Alert: Denoted by 'Longs'. Shows when the trend has flipped bullish
  2. Trend Oracle Short Trend Alert: Denoted by 'Shorts'. Shows when the trend has flipped bearish
  3. Trend Oracle Long Reversal Alert: Shows bullish reversals near the Trend Oracle
  4. Trend Oracle Short Reversal Alert: Shows bearish reversals near the Trend Oracle


⚙️ Inputs
  • Mode: Allows you to choose whether you'd like it to respond rapidly, depend the length on the timeframe, have an absolute interpretation of trend or manual length
  • Manual Length: The higher the value for the manual length, the smoother the signals. The lower, the more responsive
  • Show Oracle Reversals: Displays price reversals near the Eclipse Trend Oracle
  • Bullish Color: Color of the bullish plot and label. Lime by default
  • Bearish Color: Color of the bearish plot and label. Purple by default
  • Label Size: Change the size of the label
Notas de Lançamento
Changed thumbnail.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.