PhiMACD
Nov 22, 2014

The PhiMACD indicator utilizes the Golden Ratio (phi) to scale moving average periods, providing a multi-layered momentum oscillator that tracks trend strength across eight distinct time horizons.
Usage
The Usage section describes how the script can be used, examples should be provided in this section. This section also focuses on how main settings affect the indicator interpretation and output.
The indicator generates seven unique MACD lines by calculating the difference between sequential Exponential Moving Averages (EMAs). Users can interpret the convergence or divergence of these lines to identify trend transitions. When the lines are bundled closely together, it indicates a period of consolidation; when they fan out, it suggests a strong trending environment.
The "Fastest MACD" line (representing the shortest periods) serves as a leading signal for short-term momentum shifts. Traders often look for crossovers of these lines above or below the zero level to confirm bullish or bearish momentum. Because the periods are mathematically linked via Fibonacci proportions, the indicator acts as a comprehensive momentum ribbon that captures both short-term noise and long-term structural trends simultaneously.
Details
The PhiMACD is constructed using eight EMA inputs, typically following a sequence related by the Golden Ratio (approximately 1.618). By default, these periods are 9, 15, 24, 39, 63, 102, 165, and 267.
The calculation logic involves taking the difference between two adjacent EMAs and dividing the result by two. For example, the first MACD line is derived from (EMA1 - EMA2) / 2, the second from (EMA2 - EMA3) / 2, and so on. This process creates a tiered visualization of momentum. This implementation is based on original concepts by @lonestar108 and has been refactored for modern charting environments.
Settings
- Length 1 (9): Sets the period for the fastest EMA used in the first MACD calculation.
- Length 2 (15): Sets the period for the second EMA.
- Length 3 (24): Sets the period for the third EMA.
- Length 4 (39): Sets the period for the fourth EMA.
- Length 5 (63): Sets the period for the fifth EMA.
- Length 6 (102): Sets the period for the sixth EMA.
- Length 7 (165): Sets the period for the seventh EMA.
- Length 8 (267): Sets the period for the slowest EMA, used as the baseline for the final MACD line.
FAQ
How do I interpret the multiple lines in PhiMACD? The multiple lines represent momentum across different timeframes; when the lines are high and expanding, bullish momentum is increasing, whereas lines falling below zero indicate growing bearish momentum.
Can I change the default Fibonacci-based lengths? Yes, while the indicator is optimized for phi-related scaling, you can manually adjust all eight length inputs in the settings menu to suit your specific trading strategy.
How can I access the PhiMACD indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.