OPEN-SOURCE SCRIPT
MFI Candle Trend

🎯 Purpose:
The MFI Candle Trend is a custom TradingView indicator that transforms the Money Flow Index (MFI) into candle-style visuals using various smoothing and transformation techniques. Rather than displaying MFI as a line, this script generates synthetic candles from MFI values, helping traders visualize money flow trends, strength, and potential reversals with more clarity.
📌 Trend strength can be analyzed based on buying and selling pressures in the trend direction.
🧩 How It Works:
Calculates MFI values for open, high, low, and close prices.
Applies optional smoothing using the user-selected moving average (EMA, SMA, WMA, etc.).
Transforms the smoothed MFI data into synthetic candles using a selected method:
Normal: Uses raw MFI data
Heikin-Ashi: Applies HA transformation to MFI
Linear: Uses linear regression on MFI values
Rational Quadratic: Applies advanced rational quadratic filtering via an external kernel library
Colors candles based on MFI momentum:
Cyan: Strong positive MFI movement
Red: Strong negative MFI movement
⚙️ Key Inputs:
Method:
The type of smoothing method to apply to MFI
Options: None, EMA, SMA, SMMA (RMA), WMA, VWMA, HMA, Mode
Length:
Period for both the MFI and smoothing calculation
Candle:
Selects the transformation mode for generating synthetic candles
Options: Normal, Heikin-Ashi, Linear, Rational Quadratic
Rational Quadratic:
Adjusts the depth of smoothing for the Rational Quadratic filter (applies only if selected)
📊 Outputs:
Synthetic MFI Candlesticks:
Plotted using the smoothed and transformed MFI values.
Dynamic Coloring:
Cyan when MFI momentum is increasing
Red when MFI momentum is decreasing
Horizontal Lines:
80: Overbought zone
20: Oversold zone
🧠 Why Use This Indicator?
Unlike traditional MFI indicators that use a line plot, this tool gives traders:
A candle-based visualization of money flow momentum
Enhanced trend and reversal detection using color-coded MFI candles
A choice of smoothing filters and transformations for noise reduction
A powerful combination of momentum and structure-based analysis
To combine volume and price strength into a single chart element
❗Important Note:
This indicator is for educational and analytical purposes only. It does not constitute financial advice. Always use proper risk management and validate with additional tools or analysis.
The MFI Candle Trend is a custom TradingView indicator that transforms the Money Flow Index (MFI) into candle-style visuals using various smoothing and transformation techniques. Rather than displaying MFI as a line, this script generates synthetic candles from MFI values, helping traders visualize money flow trends, strength, and potential reversals with more clarity.
📌 Trend strength can be analyzed based on buying and selling pressures in the trend direction.
🧩 How It Works:
Calculates MFI values for open, high, low, and close prices.
Applies optional smoothing using the user-selected moving average (EMA, SMA, WMA, etc.).
Transforms the smoothed MFI data into synthetic candles using a selected method:
Normal: Uses raw MFI data
Heikin-Ashi: Applies HA transformation to MFI
Linear: Uses linear regression on MFI values
Rational Quadratic: Applies advanced rational quadratic filtering via an external kernel library
Colors candles based on MFI momentum:
Cyan: Strong positive MFI movement
Red: Strong negative MFI movement
⚙️ Key Inputs:
Method:
The type of smoothing method to apply to MFI
Options: None, EMA, SMA, SMMA (RMA), WMA, VWMA, HMA, Mode
Length:
Period for both the MFI and smoothing calculation
Candle:
Selects the transformation mode for generating synthetic candles
Options: Normal, Heikin-Ashi, Linear, Rational Quadratic
Rational Quadratic:
Adjusts the depth of smoothing for the Rational Quadratic filter (applies only if selected)
📊 Outputs:
Synthetic MFI Candlesticks:
Plotted using the smoothed and transformed MFI values.
Dynamic Coloring:
Cyan when MFI momentum is increasing
Red when MFI momentum is decreasing
Horizontal Lines:
80: Overbought zone
20: Oversold zone
🧠 Why Use This Indicator?
Unlike traditional MFI indicators that use a line plot, this tool gives traders:
A candle-based visualization of money flow momentum
Enhanced trend and reversal detection using color-coded MFI candles
A choice of smoothing filters and transformations for noise reduction
A powerful combination of momentum and structure-based analysis
To combine volume and price strength into a single chart element
❗Important Note:
This indicator is for educational and analytical purposes only. It does not constitute financial advice. Always use proper risk management and validate with additional tools or analysis.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.