OPEN-SOURCE SCRIPT

Money Flow Index Divergences [UAlgo]

🔶 Description:

This script aims providing traders with comprehensive insights into market dynamics. The indicator offers a multi-faceted approach to technical analysis, encompassing various features to enhance trading decision-making:

🔶Key Features:

Money Flow Index Oscillator Settings: Users can customize the length of the MFI oscillator and the confluence bar length to suit their trading preferences.

Gradient Color Visualization: The indicator utilizes gradient colors to visually represent the MFI oscillator, with colors shifting based on MFI values for enhanced clarity.

Confluence Area Calculation: A confluence area is calculated based on the specified length, providing additional context for MFI movements (Aims to provide longer-term information).

Divergence Detection: The script identifies bullish and bearish divergences by comparing price action with MFI oscillator movements, aiding traders in spotting potential trend reversals.

Customizable Sensitivity: Traders can adjust the sensitivity settings for divergence detection according to their trading strategies.

스냅샷

🔶Calculations:

MFI Calculation:

The script starts by calculating the Money Flow Index (MFI) using the ta.mfi() function, which takes the typical price (hlc3) and a length parameter (default set to 14). The MFI is normalized to a range between 0 and 1 for color gradient calculations.

Another MFI is calculated with a longer length (lengthConfluence, default set to 50) for confluence analysis. Similar to the MFI calculation, the highest and lowest MFI values within the confluence length are determined. The MFI values within the confluence length are normalized. The normalized MFI values are used to calculate the gradient color for the confluence area.

Gradient Color Calculations:

Two sets of RGB color values (redRGB, greenRGB, blueRGB) and (redRGB2, greenRGB2, blueRGB2) are defined to create a gradient color scheme for the MFI plot. The MFI value is normalized between the highest and lowest MFI values within the specified length. The normalized MFI value is then used to calculate the red, green, and blue components of the gradient color.

Plotting Confluence Area:

Two horizontal lines (upperArea and lowerArea) are plotted to highlight the confluence area.
The area between these lines is filled with the gradient color representing MFI confluence.
Divergence Calculations:

Bullish and bearish divergences are identified based on specific conditions related to the MFI and price action.

Bullish divergence occurs when the MFI makes a lower low while price makes a higher low.

Bearish divergence occurs when the MFI makes a higher high while price makes a lower high.

The sensitivity (Pivot calculation length) of divergence detection can be adjusted.

Overall, this script provides a comprehensive analysis of the Money Flow Index, including plotting the MFI with a gradient color scheme, identifying confluence areas, and detecting bullish and bearish divergences to aid traders in making informed decisions.

🔶Disclaimer:

-This script is provided for informational and educational purposes only and should not be considered financial advice.

-Trading involves risk, and users should conduct their own research and analysis before making any investment decisions.

-The author of this script and UAlgo are not liable for any losses incurred as a result of using this indicator.

-Users are encouraged to exercise caution and practice risk management when trading in the financial markets.
Money Flow Index (MFI)

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


Get access to our exclusive tools: ualgo.trade

Join Our Discord For Updates: discord.com/invite/kyQkKxUQkW

All scripts & Content Provided by UAlgo Are For Informational & Educational Purposes Only.
또한 다음에서도:

면책사항