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.
Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.