OPEN-SOURCE SCRIPT

Support, Resistance & Fibonacci

Key Features

1. Support and Resistance Detection:
◦ Automatically identifies support and resistance levels based on recent price patterns.
◦ Draws lines and optional labels to highlight these levels on the chart.
2. Fibonacci Levels:
◦ Calculates and draws standard Fibonacci retracement levels (23%, 38%, 50%, 61%, 78%).
◦ Supports customization of colors, line thickness, and transparency.
3. Fibonacci Extensions:
◦ Draws extension levels (e.g., 127%, 141%, 161%,200%,227%,241%) after a breakout to predict possible price targets.
4. Breakout Alerts:
◦ Sends alerts when the price breaks a support or resistance level.

Key Points and Settings
• Settings: Users can adjust colors, transparency, line thickness, lengths, and label positions.
• Support/Resistance Logic:
◦ A support level is defined when the price reverses at a low point.
◦ A resistance level is detected when the price reverses at a high point.
• Fibonacci Drawing:
◦ Retracements are calculated within the support and resistance range.
◦ Extensions are based on the distance between the last support and resistance.

Code Explanation
1. Settings:
◦ Sections like input.bool and input.color allow users to configure the indicator.
◦ Example: show_support_label toggles the display of support labels.
2. Fibonacci Levels:
◦ The fibo_draw() function calculates retracement levels and plots horizontal lines on the chart.
◦ Extensions are drawn using the fibo_extend() function for breakouts.
3. Support/Resistance Detection:
◦ Logic is based on lows and highs from the past 4 candles.
◦ Lines and labels are dynamically created and updated.
4. Alerts:
◦ The alert() function triggers notifications during breakouts.

How to Use

1. Click "Add to Chart" to display the indicator on your chart.
2. Customize the settings via the right-hand panel (colors, alerts, Fibonacci levels).
3. Observe how support and resistance lines, as well as Fibonacci levels, are displayed on your chart.
Candlestick analysisChart patternsCycles

Skrypt open-source

W prawdziwym duchu TradingView autor tego skryptu opublikował go jako open source, aby inwestorzy mogli go zrozumieć i zweryfikować. Pozdrowienia dla autora! Możesz go używać bezpłatnie, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Chcesz użyć tego skryptu na wykresie?

Wyłączenie odpowiedzialności