OPEN-SOURCE SCRIPT
Mis à jour

Adaptive Momentum Oscillator (MTF Signal Framework)

1 255
📖 Overview

The Adaptive Momentum Oscillator is a multi-layer analytical tool designed to evaluate market momentum through a combination of smoothed price deviation, signal averaging, and regime-based visualization.

Instead of relying on a single momentum calculation, the indicator builds a structured view of market behavior by separating:

underlying momentum pressure
signal smoothing
and trend regime states

This allows traders to interpret market conditions with reduced noise and clearer directional context.

⭐ Key Features
🔹 Multi-Layer Momentum Structure

The oscillator combines raw momentum movement with smoothed signal lines to separate short-term fluctuations from broader directional bias.

🔹 Signal Confirmation Logic

Buy and sell conditions are derived from structured momentum shifts rather than single threshold crossings, helping reduce premature signals in choppy conditions.

🔹 Trend Regime Visualization

The indicator highlights different market phases:

bullish expansion zones
bearish expansion zones
neutral or transition phases

This helps contextualize momentum behavior instead of treating all movement equally.

🔹 Histogram Momentum Tracking

The histogram represents the acceleration and deceleration of momentum, allowing traders to observe weakening or strengthening trends.

🔹 Dynamic Signal Behavior

Signals adapt to market conditions instead of using fixed static rules, improving responsiveness during volatility changes.

📊 How to Interpret
🟢 Buy Signal

Indicates that momentum has shifted upward and confirmation conditions are aligned with bullish pressure.

🔴 Sell Signal

Indicates that momentum has shifted downward and bearish pressure dominates recent structure.

📉 Histogram
Increasing bars = strengthening momentum
Decreasing bars = weakening momentum
Color shifts = regime transitions
🎯 Best Applications
Swing trading
Momentum confirmation
Trend filtering
Reversal detection
Market structure analysis
⚠️ Limitations

This indicator should not be used as a standalone trading system.

Momentum signals may lag during rapid reversals, and additional confirmation from price action or risk management is recommended.

💡 Originality

Unlike traditional oscillators such as MACD or RSI, this script is designed as a multi-layer momentum framework, where:

raw momentum
smoothed signal behavior
and regime classification

are combined into a unified structure.

The goal is not to generate isolated signals, but to provide a continuous model of market momentum behavior across different phases.
Notes de version
🎨 Improved Histogram Pressure Colors

The histogram now provides a clearer view of momentum strength and exhaustion.
Cool cyan, blue, and indigo colors represent positive or “Greed” momentum.
Warm yellow, orange, and red colors represent negative or “Fear” momentum.
Four visual strength levels identify Weak, Medium, Strong, and Extreme pressure.
Bright colors indicate momentum is still expanding or holding its strength.
Darker colors indicate contraction, deceleration, or possible relief.
Additional frames and experimental extreme markers were removed to keep the histogram easier to read.

📊 Adaptive Season Pressure

Positive and negative histogram seasons now receive their own frozen reference when sufficient historical information is available.
This prevents the reference from continuously moving while the current momentum wave expands.
Pressure values are uncapped and may exceed 100. A reading of 100 represents the historical reference used for that season—it is not a probability or guaranteed market limit.

🔺 Early Braking Arrows
Small semi-transparent arrows can appear while momentum is still expanding but beginning to decelerate.
These arrows provide an early warning that the current momentum wave may be losing acceleration.
They do not confirm that a reversal has started.

🔻 Price-Confirmed Relief Arrows
Solid arrows now require stronger confirmation.
Before appearing, the histogram must:
Have previously reached strong pressure.
Be contracting in the expected direction.
Retreat at least 8% from its season peak.
Pass the selected price-confirmation method.
Two confirmation modes are available:
Balanced: earlier and more frequent; uses candle direction together with a short EMA.
Strict: later and more selective; requires price to close beyond the previous candle’s high or low.
These arrows represent price-confirmed momentum relief, not guaranteed trend reversals.

🟢 Improved BUY Signals

BUY banners use confirmed MACD pivots formed inside an adaptive Extreme Fear session.
The calculation now checks the market state on the original pivot candle. This means a valid pivot is not automatically rejected simply because the oscillator exited the extreme zone before the pivot was confirmed.
Repeated BUY signals require a meaningfully deeper momentum pivot or a new price low.

🔴 Improved SELL Signals

SELL banners use the mirrored calculation inside an adaptive Extreme Greed session.
Repeated SELL signals require a meaningfully higher momentum pivot or a new price high.
Cooldown tracking was also improved so a qualifying extreme still updates the internal reference even when its banner is temporarily blocked by the cooldown.

⏱️ Transparent Pivot Timing

BUY, SELL, H, and L markers require future candles to confirm their pivots.
The new Pivot Signal Placement setting provides two display options:
Confirmation Bar: the default and recommended option. The marker appears when the pivot first becomes known.
Pivot Bar: draws the confirmed marker back on the historical pivot candle for visual analysis.
With the default Pivot Right Bars = 2, a pivot requires two later closed candles before confirmation. Selecting Pivot Bar does not remove this delay or make the signal available earlier.

🏷️ Confirmed H/L Markers and Crossover Dots

H identifies a confirmed positive histogram pivot.
L identifies a confirmed negative histogram pivot.
Green dots identify confirmed MACD crosses above the signal line.
Red dots identify confirmed MACD crosses below the signal line.
The H and L markers describe histogram pivots, not price highs or price lows.

🔔 Modernized Alerts

Eight close-confirmed alert conditions are now available:
Confirmed BUY Banner
Confirmed SELL Banner
Entered Fear Zone
Entered Greed Zone
Histogram High Banner
Histogram Low Banner
Green Dot / MACD Cross Up
Red Dot / MACD Cross Down
Fear and Greed entry alerts use the standard adaptive zones. BUY and SELL banners continue to use the more selective extreme-zone and pivot calculations.
🛠️ Calculation Stability
Additional internal improvements include:
Pressure calculations wait for sufficient historical information.
A volatility floor reduces exaggerated readings caused by extremely small references.
Extreme sessions initialize correctly when adaptive bands first become available.
Pivot-derived signals, arrows, crossover dots, and alerts are confirmed at candle close.

⚠️ Important Clarification

“Fear” and “Greed” are names used to describe negative and positive price-based momentum pressure. They are not external sentiment, survey, news, or on-chain data.
Signal events are candle-close confirmed, but the live oscillator lines, histogram colors, adaptive zones, backgrounds, and dashboard may continue changing while the current candle remains open.
This indicator identifies momentum conditions and possible relief—it does not predict or guarantee future price direction.
Notes de version
🎨 Classic Histogram Color Toggle
A new Use Classic Histogram Colors setting has been added under Histogram Pressure.
Users can now switch between two histogram styles without changing any calculations or signals.

Adaptive Colors — Default
The current adaptive palette displays both momentum direction and relative pressure strength.
Bright colors indicate expanding momentum.
Dark colors indicate contracting momentum or relief.
Different shades represent Weak, Medium, Strong, and Extreme pressure.

Classic Colors
The original four-color histogram is now available:
Aqua: positive histogram rising.
Blue: positive histogram falling.
Red: negative histogram falling.
Maroon: negative histogram rising.
Gray: histogram unchanged.

The Classic palette focuses on whether momentum is above or below zero and whether it is accelerating or decelerating. It does not display the adaptive pressure-strength tiers.

🔒 Calculations Remain Unchanged
This setting changes only the histogram bar colors.
It does not modify:
Early braking arrows
Price-confirmed relief arrows
Arrow colors or timing
Histogram pressure calculations
BUY and SELL signals
H and L banners
Adaptive zones
Crossover dots
Dashboard information
Alert conditions
This allows users to select their preferred visual style while preserving identical indicator behavior.
Notes de version
💜 Purple Internal H/L Banners

The indicator can now identify local histogram reversals that occur without the histogram changing to the opposite side of zero.
Purple L: the positive histogram forms a confirmed local low and turns upward.
Purple H: the negative histogram forms a confirmed local high and turns downward.
These markers help identify internal momentum turns that the existing H/L banners do not cover.

The two banner systems can be controlled independently:
Show Normal H/L Banners
Show Purple Internal H/L Banners
Normal and Purple Banners
Blue H = positive histogram high.
Orange L = negative histogram low.
Purple L = positive histogram internal low.
Purple H = negative histogram internal high.

🔔 New Purple H/L Alerts

Two close-confirmed alert conditions have been added:
Purple Internal Histogram High Banner
Purple Internal Histogram Low Banner
The script now provides 10 individual alert conditions.
The purple-banner visibility setting controls only the chart labels. Alerts remain independently selectable from TradingView’s alert menu.

💪 Trend-Strength Arrows

The arrow system now displays both momentum relief and momentum strength.
Bullish Strength
A solid green ▲ can appear near the base of a positive histogram bar when:
The histogram is expanding upward.
Relative positive pressure is Strong or higher.
The selected price confirmation passes.
No early-braking condition is active.
The candle has closed.

Bearish Strength
A solid red ▼ can appear near the base of a negative histogram bar when:
The histogram is expanding downward.
Relative negative pressure is Strong or higher.
The selected price confirmation passes.
No early-braking condition is active.
The candle has closed.
The new arrows can be enabled or disabled with:
Show Trend-Strength Arrows

🧭 Reading the Arrow Locations

Arrow placement now helps explain its purpose:
Arrow near the histogram base: momentum strength or continuation.
Arrow beyond the histogram tip: momentum contraction, exhaustion, or relief.
Semi-transparent arrow: early momentum braking.
This provides a visual distinction between strengthening momentum and possible relief.

⚙️ Balanced and Strict Confirmation

The existing Solid Arrow Confirmation setting now applies to:
Solid trend-strength arrows.
Solid relief arrows.
Balanced
Provides earlier and more frequent confirmation.
Bullish confirmation requires price to close higher than the previous candle and above EMA 3.
Bearish confirmation requires price to close lower than the previous candle and below EMA 3.
Strict
Provides fewer and more selective confirmations.
Bullish confirmation requires price to close above the previous candle’s high.
Bearish confirmation requires price to close below the previous candle’s low.
Semi-transparent early-braking arrows remain momentum-only warnings and are not filtered by Balanced or Strict mode.
🔒 Existing Calculations Preserved
These updates do not change:
The MACD calculation.
Adaptive Fear and Greed zones.
Histogram pressure normalization.
Classic and Adaptive histogram colors.
BUY and SELL banner logic.
Normal H/L banner logic.
Crossover dots.
Existing alerts.

⚠️ Important Signal Timing

Purple H/L banners use confirmed histogram pivots. They require the selected number of Pivot Right Bars to close before the pivot becomes known.
When Pivot Bar placement is selected, the confirmed label is drawn back on the historical pivot candle for visual reference. This does not mean the signal was available on that earlier candle.
Trend-strength and relief arrows are plotted on their actual confirmation candle.

⚠️ Interpretation

Strength arrows indicate confirmed momentum expansion under the indicator’s internal rules. They do not guarantee that the trend will continue.
Relief arrows and purple H/L banners identify momentum changes or local pivots. They do not guarantee a price reversal.
The indicator should be combined with price structure, risk management, and additional confirmation.

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.