PROTECTED SOURCE SCRIPT

[Top] 🦙 LHAMA-MACD

8
🦙 LHAMA-MACD — Low-High Adaptive MACD Oscillator
This indicator is a custom MACD-style oscillator that uses LHAMA (Low-High Adaptive Moving Average) smoothing instead of conventional EMAs. LHAMA dynamically adapts its responsiveness based on recent high/low price activity, aiming to reduce lag and improve sensitivity to trend shifts compared to standard MACD.

How It Works
LHAMA Calculation:
For both fast and slow components, the indicator evaluates whether the highest high or lowest low over the lookback length is changing. When new extremes are detected, an adaptive tracking coefficient increases, making the moving average respond faster. This results in a moving average that adapts more quickly during volatility and smooths out during consolidation.

MACD Line:
The difference between the fast LHAMA and slow LHAMA.

Signal Line:
An EMA of the MACD line over a user-defined period.

Histogram:
The difference between the MACD Line and the Signal Line.

Crossover Labels:
Green star ✳️ appears below price when the MACD crosses above the Signal Line (potential bullish momentum).
Orange star ✴️ appears above price when the MACD crosses below the Signal Line (potential bearish momentum).

Inputs
  • Price Source: The price data to analyze (default: close).
  • Fast LHAMA Length: Period for the faster adaptive average.
  • Slow LHAMA Length: Period for the slower adaptive average.
  • Signal EMA Length: Smoothing period for the Signal Line.
  • Show Histogram: Toggle histogram display.
  • Show Oscillator Lines: Toggle MACD and Signal Lines display.


How to Use
  • Trend Confirmation: Use histogram and line crossovers to gauge trend strength and potential reversals.
  • Momentum Shifts: Bullish crossovers may indicate increasing upside momentum, while bearish crossovers can signal weakening price action.
  • Subpane Visualization: The oscillator plots in a separate pane below your chart.
  • Price Markers: Labels appear directly on the price chart for clearer visual signals.


This tool can complement price action strategies by providing early warnings of trend changes and momentum shifts, thanks to its adaptive smoothing approach.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。