OPEN-SOURCE SCRIPT

Fusion MFI RSI

Hello fellas,

This superb indicator summons two monsters called Relative Strength Index (RSI) and Money Flow Index (MFI) and plays the Yu-Gi-Oh! card "Polymerization" to combine them.

Overview

The Fusion MFI RSI Indicator is an advanced analytical tool designed to provide a nuanced understanding of market dynamics by combining the Relative Strength Index (RSI) and the Money Flow Index (MFI). Enhanced with sophisticated smoothing techniques and the Inverse Fisher Transform (IFT), this indicator excels in identifying key market conditions such as overbought and oversold states, trends, and potential reversal points.

Key Features (Brief Overview)

  • Fusion of RSI and MFI: Integrates momentum and volume for a comprehensive market analysis.
  • Advanced Smoothing Techniques: Employs Hann Window, Jurik Moving Average (JMA), T3 Smoothing, and Super Smoother to refine signals.
  • Inverse Fisher Transform (IFT) Enhances the clarity and distinctiveness of indicator outputs.


Detailed Feature Analysis

Fusion of RSI and MFI

  • RSI (Relative Strength Index): Developed by J. Welles Wilder Jr., the RSI measures the speed and magnitude of directional price movements. Wilder recommended using a 14-day period and identified overbought conditions above 70 and oversold conditions below 30.
  • MFI (Money Flow Index): Created by Gene Quong and Avrum Soudack, the MFI combines price and volume to measure trading pressure. It is typically calculated using a 14-day period, with over 80 considered overbought and under 20 as oversold.
  • Application in Fusion: By combining RSI and MFI, the indicator leverages RSI's sensitivity to price changes with MFI's volume-weighted confirmation, providing a robust analysis tool. This combination is particularly effective in confirming the strength behind price movements, making the signals more reliable.


Advanced Smoothing Techniques

  • Hann Window: Traditionally used to reduce the abrupt data discontinuities at the edges of a sample, it is applied here to smooth the price data.
  • Jurik Moving Average (JMA): Known for preserving the timing and smoothness of the data, JMA reduces market noise effectively without significant lag.
  • T3 Smoothing: Developed to respond quickly to market changes, T3 provides a smoother response to price fluctuations.
  • Super Smoother: Filters out high-frequency noise while retaining important trends.
  • Application in Fusion: These techniques are chosen to refine the output of the combined RSI and MFI values, ensuring the indicator remains responsive yet stable, providing clearer and more actionable signals.


Inverse Fisher Transform (IFT):

Developed by John Ehlers, the IFT transforms oscillator outputs to enhance the clarity of extreme values. This is particularly useful in this fusion indicator to make critical turning points more distinct and actionable.

Mathematical Calculations for the Fusion MFI RSI Indicator

RSI (Relative Strength Index)

The RSI is calculated using the following steps:

Average Gain and Average Loss: First, determine the average gain and average loss over the specified period (typically 14 days). This is done by summing all the gains and losses over the period and then dividing each by the period.

Average Gain = (Sum of Gains over the past 14 periods) / 14
Average Loss = (Sum of Losses over the past 14 periods) / 14

Relative Strength (RS): This is the ratio of average gain to average loss.

RS = Average Gain / Average Loss

RSI: Finally, the RSI is calculated using the RS value:

RSI = 100 - (100 / (1 + RS))

MFI (Money Flow Index)

The MFI is calculated using several steps that incorporate both price and volume:

Typical Price: Calculate the typical price for each period.

Typical Price = (High + Low + Close) / 3

Raw Money Flow: Multiply the typical price by the volume for the period.

Raw Money Flow = Typical Price * Volume

Positive and Negative Money Flow: Compare the typical price of the current period to the previous period to determine if the money flow is positive or negative.

If today's Typical Price > Yesterday's Typical Price, then Positive Money Flow = Raw Money Flow; Negative Money Flow = 0
If today's Typical Price < Yesterday's Typical Price, then Negative Money Flow = Raw Money Flow; Positive Money Flow = 0

Money Flow Ratio: Calculate the ratio of the sum of Positive Money Flows to the sum of Negative Money Flows over the past 14 periods.

Money Flow Ratio = (Sum of Positive Money Flows over 14 periods) / (Sum of Negative Money Flows over 14 periods)

MFI: Finally, calculate the MFI using the Money Flow Ratio.

MFI = 100 - (100 / (1 + Money Flow Ratio))

Fusion of RSI and MFI

The final Fusion MFI RSI value could be calculated by averaging the IFT-transformed values of RSI and MFI, providing a single oscillator value that reflects both momentum and volume-weighted price action:

Fusion MFI RSI = (MFI weight * MFI) + (RSI weight * RSI)

Suggested Settings and Trading Rules

Original Usage

  • RSI: Wilder suggested buying when the RSI moves above 30 from below (enter long) and selling when the RSI moves below 70 from above (enter short). He recommended exiting long positions when the RSI reaches 70 or higher and exiting short positions when the RSI falls below 30.
  • MFI: Quong and Soudack recommended buying when the MFI is below 20 and starts rising (enter long), and selling when it is above 80 and starts declining (enter short). They suggested exiting long positions when the MFI reaches 80 or higher and exiting short positions when the MFI falls below 20.


Fusion Application

Settings: Use a 14-day period for this indicator's calculations to maintain consistency with the original settings suggested by the inventors.

Trading Rules:

  • Enter Long Signal: Consider entering a long position when both RSI and MFI are below their respective oversold levels and begin to rise. This indicates strong buying pressure supported by both price momentum and volume.
  • Exit Long Signal: Exit the long position when either RSI or MFI reaches its respective overbought threshold, suggesting a potential reversal or decrease in buying pressure.
  • Enter Short Signal: Consider entering a short position when both indicators are above their respective overbought levels and begin to decline, suggesting that selling pressure is mounting.
  • Exit Short Signal: Exit the short position when either RSI or MFI falls below its respective oversold threshold, indicating diminishing selling pressure and a potential upward reversal.

    How to Use the Indicator
    1. Select Source and Timeframe: Choose the data source and the timeframe for analysis.
    2. Configure Fusion Settings: Adjust the weights for RSI and MFI.
    3. Choose Smoothing Technique: Select and configure the desired smoothing method to suit the market conditions and personal preference.
    4. Enable Fisherization: Optionally apply the Inverse Fisher Transform to enhance signal clarity.
    5. Customize Visualization: Set up gradient coloring, background plots, and bands according to your preferences.
    6. Interpret the Indicator: Use the Fusion value and visual cues to identify market conditions and potential trading opportunities.
    Conclusion

    The Fusion MFI RSI Indicator integrates classical and modern technical analysis concepts to provide a comprehensive tool for market analysis. By combining RSI and MFI with advanced smoothing techniques and the Inverse Fisher Transform, this indicator offers enhanced insights, aiding traders in making more informed and timely trading decisions. Customize the settings to align with your trading strategy and leverage this powerful tool to navigate financial markets effectively.

    Best regards,
    simwai

    ---

    Credits to:
    loxx – T3
    everget – JMA
    cheatcountry – Hann Window
fusionIFTinversefishertransformMFIMomentum OscillatorsMoney Flow Index (MFI)no-repaintoverbought-oversoldRelative Strength Index (RSI)

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?


คำจำกัดสิทธิ์ความรับผิดชอบ