OPEN-SOURCE SCRIPT

Fibonacci Levels with Stats

By Unjuno
Primary Usage:
Drawing Fibonacci Retracements
Based on the past highs and lows, Fibonacci retracement levels (23.6%, 38.2%, 50%, 61.8%, 78.6%) are calculated and displayed on the chart. The Fibonacci levels are different for positive and negative lines, respectively.

Statistical Counting Function
Records the number of times each Fibonacci level is exceeded and tracks how often price reaches that level. This data can be useful for future price forecasting.

Cueing Symbols by Pattern Matching
Symbols are added to the queue when each Fibonacci level is exceeded. Depending on whether the price is positive or negative, different symbols (1, 2, 3, etc.) are assigned, which are used to predict the next move.

Change background color
Based on the number of times the price exceeds the Fibonacci level, the background color will change to green or red. The intensity of the color changes according to the number of consecutive times the price has exceeded the Fibonacci level.

Cue Size Limitations
Past symbols are added to the queue, but a size limit is set and old symbols are deleted when the queue exceeds a certain size.

Prediction Logic
Pattern matching is used to predict the next symbol based on patterns of past symbols.
Candlestick analysisChart patterns

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer