UAlgo

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.

Join Our Journey ! -> ualgo.trade

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

All scripts & Content Provided by UAlgo Are For Informational & Educational Purposes Only.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

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