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

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明