OPEN-SOURCE SCRIPT

Auto Fibonacci TP Levels [WJ]

This script automatically draws Fibonacci levels on a trading chart which are popular tools for traders seeking to identify potential areas of support and resistance.

Here are the features and benefits of this script:

1. Versatility in Sourcing Trade Entries:
Trade source can be customized to either longs (buying trades) or shorts (selling trades). The user has the flexibility to adjust their entry points based on their trading strategy.
Up to 2 sources can be used, expand if you wish.
As it is coded now, the source you have to pick from has to have a 'plot' that sends a (long) or (short) and is equal to 1 and 2 respectively.

Example: In the script you want to use for Long and Shorts, make a plot like this:
plot(LONG ? 1 : SHORT ? 2 : 0, title = "⭐ Outbound signal", display = display.none, editable = false)

The variable name of the LONG and SHORT needs to be the same as the one your code is using to indicate those trades.

2. Flexible Fibonacci Start Points:
The starting points for drawing Fibonacci levels can be customized for both longs and shorts.

3. Configurable Historical Data Length:
Users can adjust the number of historical bars to analyze for calculating higher highs (HH) and lower lows (LL).

4. Informative Labels and Lines:
The script can be configured to show the distance from the entry point to the 0.618 Fibonacci level (the so-called "golden ratio"). This helps traders to visualize the risk-reward ratio of their trades.
It indicates when a Fibonacci level was crossed which could signal a potential reversal.
It allows users to display the golden pocket levels only (0.618 and 0.65) or all the Fibonacci levels.

5. Customizable Fibonacci Levels and Colors:
Users can define their preferred Fibonacci levels and assign specific colors to each of these levels. This helps in identifying different levels quickly and intuitively.
The script also includes functionality for setting stop loss levels for short and long positions, which helps in risk management.

6. Clear Visualization of Crossing Levels:
If a trade crosses a specific Fibonacci level, the script draws lines indicating the crossing. This can help traders to identify potential breakout or reversal points.

7. Calculation of Fibonacci Boxes:
For each Fibonacci level, the script creates a box that indicates the level's range on the chart. This visual aid can help traders to better understand the price movement within these levels.

8. Customizable Labels:
The script provides percentage difference labels at each Fibonacci level, displaying the difference between the price at that level and the price at the 0 Fibonacci level. This can help users quickly understand the price change in terms of percentage at each level.

9. Performance Efficiency:
The script uses arrays to store and manage the Fibonacci levels and their associated colors. This approach enhances the performance of the script, especially when processing a large amount of data.

10. Adaptability:
This script automatically adapts to market movements. When the price crosses a level, it identifies and records this event, aiding the trader's decision-making process.

Overall, this script is highly customizable, adaptable and provides a clear visual representation of important trading data, making it an effective tool for traders using Fibonacci levels in their strategies.

NOTE: If you can't see the fib lines, it is because they have already been triggered/touched by a candle and they are set to not continue after they are touched.
automatedCandlestick analysisChart patternsfibonnacci

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal