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.
Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.