OPEN-SOURCE SCRIPT

For Loop THMA ~ CharonQuant

126
The For Loop THMA is a trend classification and momentum confirmation indicator designed to measure directional strength through relative price dominance, not raw crossings.

This indicator blends a Triple Hull Moving Average structure with a for-loop comparison engine and multiple trend quality filters to reduce noise and false signals.

Concept Overview
The core idea behind this indicator is simple:
Instead of asking “did price cross a line?”, it asks
“How often is the price stronger than its recent past?”
By looping over previous THMA values and comparing them to the current value, the indicator builds a directional score that reflects internal momentum and persistence.
This approach allows trends to be evaluated statistically rather than emotionally.

Indicator Components
The For Loop THMA is composed of four layers:
• Triple Hull Moving Average (THMA) as the smoothed price backbone
• For-loop counter to quantify relative dominance over a lookback window
• EMA trend filter to align signals with higher-timeframe bias
• ADX + DMI filter to ensure sufficient trend strength
Signals are only produced when all components align.

For-Loop Logic
The for-loop compares the current THMA value to its past values over a user-defined range.
Each comparison increments or decrements a counter, producing an oscillator that reflects bullish or bearish pressure.
Optional weighting can be enabled to give more importance to recent price action.
This counter becomes the primary decision engine of the indicator.

Visual Interpretation
• The oscillator displays the strength and direction of the trend
• Threshold lines define bullish and bearish regimes
• Bar coloring reflects the active trend state
• Color intensity adapts to directional confidence

Credits and Inspiration
This indicator is inspired by and builds upon:
• THMA ~ CharonQuant
• For Loop MA Indicator from CraftMan18

Development and usage notes:
You must tweak the parameters to fit your market, timeframe, and trading style.
If you do not read this description or do not understand what the indicator is designed to do, do not use it.
Indicators amplify both discipline and mistakes.
Important reminder: No single indicator is sufficient on its own.


Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.