MUQWISHI

Fibonacci Levels on Any Indicator [By MUQWISHI]

▋ INTRODUCTION :
A “Fibonacci Levels on Any Indicator” can be applied to any indicator to draw Fibonacci levels based on provided conditions of two price points to produce a sequence of horizontal line levels starting from 0% to 100% in addition to extension levels. The 0% level is measured as the start of retracement, while the 100% level is the beginning of the extension levels. This tool was developed to be easy to add to any indicator, and it could be valuable to some traders in terms of managing trades by setting targets and reducing risk in the trend direction.


_______________________
▋ USAGE:

➤ NEEDS TO IDENTIFY 4 ELEMENTS:
1. Starting Point. What’re the conditions / When will the drawing of the Fibonacci levels begin?
2. Ending Point. What’re the conditions / When will the drawing of the Fibonacci levels end?
3. High Point. What is the price for a 100% Fibonacci level (0% for the downside)?
4. Low Point. What is the price for a 0% Fibonacci level (100% for the downside)?


➤ STARTING & ENDING POINTS CONDITIONS:
Need to specify the condition when the drawing of Fibonacci levels starts and ends, and the indicator shows different prepared conditions.
  • New Phase: Import a value (plot) from an existing indicator, where its status changes from NaN to a real number.
  • Crosses Above/Below: Import a value(1) (plot) from an existing indicator, where it crosses above/below value(2).
  • Reversal Up/Down: Import a value(1) (plot) from an existing indicator, where it rises/decreases than the previous value(1).
  • First/Last Bar: Useful to draw stationary Fibonacci levels.


➤ UPPER & LOWER PIVOTS (0% & 100%):
Need to specify the two price points representing 0% & 100% Fibonacci levels to expose the sequence of Fibonacci lines.
  • Upper Pivot. By default, the ATR Upper Band. It’s possible to import a custom value from an existing indicator.
  • Lower Pivot. By default, the ATR Lower Band. It’s possible to import a custom value from an existing indicator.


➤ FIBONACCI STYLING OPTIONS:
Ability to customize line & label style, color, reverse, and hide/show levels.


_______________________
▋ IMPLEMENTATION:
Here are some examples of implementing the indicator.
Note: All presented examples below are for demonstration purposes, and they're not trading suggestions.


# Example 1: (Reversal Up/Down)
We want to implement Fibonacci levels on the Hull MA by mohamed982. Our requirements are as follows:
  • Fibonacci levels start when the Hull MA reverses up.
  • Fibonacci levels end when the Hull MA reverses down.
  • Upper Pivot is the ATR Upper Band.
  • Lower Pivot is the ATR Lower Band.
After adding the required indicator (Hull MA), here’re the implementation and results


# Example 2: (Crosses Above/Below)
We want to implement Fibonacci Level on the Squeeze Momentum by LazyBear. Our requirements are as follows:
  • Fibonacci levels start when the Squeeze Momentum histogram crosses above 0.
  • Fibonacci levels end when the Squeeze Momentum histogram crosses below 0.
  • Upper Pivot is the Bollinger Upper Band.
  • Lower Pivot is the Bollinger Lower Band.
After adding the required indicators (Squeeze Momentum & Bollinger Band), here’re the implementation and results


# Example 3: (Crosses Above/Below)
We want to implement Fibonacci Level on the Crossing Moving Averages. Our requirements are as follows:
  • Fibonacci levels start when the 20-EMA crosses above 100-MA.
  • Fibonacci levels end when the 20-EMA crosses below 100-MA.
  • Upper Pivot is the ATR Upper Band.
  • Lower Pivot is the ATR Lower Band.
After adding the required indicators (20-EMA & 100-MA), here’re the implementation and results


# Example 4: (New Phase: When the previous value is NaN, and the current value is a real number.)
We want to implement Fibonacci Level on the Supertrend. Our requirements are as follows:
  • Fibonacci levels start when an up-Supertrend (green) line shows up.
  • Fibonacci levels end when a down-Supertrend (red) line shows up.
  • Upper Pivot is the down-Supertrend.
  • Lower Pivot is the up-Supertrend.
After adding the required indicator (Supertrend), here’re the implementation and results


# Example 5: (First/Last Bar)
We want to implement Fibonacci Level between two points, 330 & 300. Our requirements are as follows:
  • Fibonacci levels start at first bar on the chart.
  • Fibonacci levels end at last bar on the chart.
  • Upper Pivot is 330.
  • Lower Pivot is 300.
Here’re the implementation and results.
To customize the number of bars back (like 50 bars)


_______________________
▋ Final Comments:
  • The “Fibonacci Levels on Any Indicator” is made to apply on other indicators for planning Fibonacci Levels.
  • It can be implemented in different ways, along with presented examples.
  • This indicator does not work with plots that were developed by drawing classes.


Please let me know if you have any questions.
Thank you.


Trusted Pine Programmer, I Provide Coding Services. For Inquiries
► Website muqwishi.com/home/quotation/
► Telegram t.me/MUQWISHI


⛾ Support My Work on “Buy Me a Coffee” buymeacoffee.com/muqwishi
오픈 소스 스크립트

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

면책사항

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

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