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

Pivot Low (ta.pivotlow)

Adaptive Simple Moving Average (SMA) Band

This is a composite, non-standard indicator constructed from three distinct components: an SMA, an ATR, and an adaptive length mechanism.

2. Logic Layering & Confluence

The script’s engine is built on a foundation of hierarchical filtering governed by a single boolean state variable: direction. This variable acts as a master switch, determining which set of rules the script is currently enforcing. The system is always in one of two mutually exclusive states.

This asymmetrical layering ensures the script is never looking for bullish and bearish signals simultaneously, dramatically reducing logical conflicts and improving the signal-to-noise ratio.

3. The Execution Engine

The script’s execution is defined by two distinct state-flipping triggers. These are not “entry/exit” signals in the traditional sense, but rather the definitive moments that change the script’s entire operational mode.

Bearish State Trigger (Trend Initiation)

Bullish State Trigger (Trend Reversal)

Mathematical Constants & Their Influence