OPEN-SOURCE SCRIPT
MACD/PPO ALMA Edition

MACD – a trend-following indicator that "always too late" indicates what's happening on the chart.
To make this indicator traditionally considered "good but too late" based on the ALMA moving average:
The Arnaud Legoux Moving Average (ALMA) is a technical indicator designed to reduce lag and noise in price data by applying a Gaussian filter, offering a smoother and more responsive alternative to traditional SMAs and EMAs.
Key Aspects of ALMA:
Key Parameters: ALMA uses three main settings: Window Size (length), Offset (offsets focus on recent prices, typically 0.85), and Sigma (controls the smoothness of the curve, typically 6).
Reduced Latency: By shifting the Gaussian distribution toward the most recent data (offset to 1), ALMA responds faster to price changes, helping to avoid false signals in uncertain, low-volatility conditions.
Using ALMA instead of EMA/SMA in the code significantly improves the smoothness and speed of signal appearance, which facilitates decision-making.
The code features three significant changes compared to traditional methods:
1. The price is determined based on (open+close)/2 - why is this? - theoretically, the volume-weighted asset value is always between the opening and closing prices, so I considered averaging it to be a good value.
2. Additional coloring of the trend change after the curves intersect to indicate an increase or decrease in trend strength.
3. Using PPO normalization allows for comparison of the dynamics of different stocks, as its values are normalized percentages and not absolute MACD values.
I most often use Heikin Ashi – the chart is very smooth and does not significantly affect the quick identification of trend changes.
To make this indicator traditionally considered "good but too late" based on the ALMA moving average:
The Arnaud Legoux Moving Average (ALMA) is a technical indicator designed to reduce lag and noise in price data by applying a Gaussian filter, offering a smoother and more responsive alternative to traditional SMAs and EMAs.
Key Aspects of ALMA:
Key Parameters: ALMA uses three main settings: Window Size (length), Offset (offsets focus on recent prices, typically 0.85), and Sigma (controls the smoothness of the curve, typically 6).
Reduced Latency: By shifting the Gaussian distribution toward the most recent data (offset to 1), ALMA responds faster to price changes, helping to avoid false signals in uncertain, low-volatility conditions.
Using ALMA instead of EMA/SMA in the code significantly improves the smoothness and speed of signal appearance, which facilitates decision-making.
The code features three significant changes compared to traditional methods:
1. The price is determined based on (open+close)/2 - why is this? - theoretically, the volume-weighted asset value is always between the opening and closing prices, so I considered averaging it to be a good value.
2. Additional coloring of the trend change after the curves intersect to indicate an increase or decrease in trend strength.
3. Using PPO normalization allows for comparison of the dynamics of different stocks, as its values are normalized percentages and not absolute MACD values.
I most often use Heikin Ashi – the chart is very smooth and does not significantly affect the quick identification of trend changes.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.