Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Indicators Description

1. Component Deconstruction

Kaufman’s Efficiency Ratio (ER)

Average True Range (ATR)

Simple Moving Average (SMA) of ATR

Adaptive Volatility Threshold


2. Logic Layering & Confluence

The script’s engine uses a hierarchical filtering model to classify the market into one of four distinct regimes.

Interaction Dynamics

The primary interaction is a Threshold Cross between the Efficiency Ratio (er) and the dynamicThreshold. This comparison acts as the primary gatekeeper for the entire logic system.

Hierarchical Filtering

The classification follows a two-stage decision tree:

This layered approach ensures that a “trend” is not just directional movement, but efficient directional movement, adjusted for the current volatility environment.


3. The Execution Engine

The execution engine is designed to detect four types of divergences between price and the Efficiency Ratio oscillator. It operates independently of the regime classification but provides the core trade triggers.

Pivot Point Detection

The engine first identifies swing highs and swing lows using a non-repainting confirmation method.

Divergence Trigger Logic

Upon the confirmation of a new swing point, the script compares its price and ER values to the previously stored swing point of the same type (high-to-high, low-to-low).

Mathematical Constants & Parameters

The script’s behavior is governed by its input parameters, which act as adjustable constants.