OPEN-SOURCE SCRIPT

Support & Resistance with Buy/Sell signal -DHJ


Features: Support & Resistance with Buy/Sell signal -
EMA 9 and EMA 21: These two EMAs are calculated and plotted on the chart. They are commonly used to identify short-term and medium-term trends.
Dynamic EMA Color: The colors of the EMAs change dynamically depending on their current direction. If an EMA is rising, it turns green (uptrend), and if it is falling, it turns red (downtrend). The user can toggle this feature on or off.
User Customization: Users can define custom colors for both EMAs and toggle the dynamic color feature on/off via input options.
Crossover and Crossunder Signals:

Crossover Signal (Long Condition): A Buy signal is generated when EMA 9 crosses above EMA 21.
Crossunder Signal (Short Condition): A Sell signal is generated when EMA 9 crosses below EMA 21.
The signals are displayed as up and down arrows below or above the bars.
Support and Resistance Levels:

Pivot Points: The script calculates pivot highs and lows to identify potential support and resistance levels in the market.
Volume-Weighted Support/Resistance: Support and resistance levels are filtered based on volume. Stronger support levels are identified when volume is high, while weaker resistance levels are marked when volume is low.
Boxes for Support/Resistance: The support and resistance levels are drawn as colored boxes with adjustable width. These boxes represent significant price levels where the price might reverse or face resistance.

Dynamic Color of Boxes: The color of the support box turns green when the price is above the support, and it turns red when the price breaks below it. Similarly, the resistance box color changes based on the price interaction.
Breakout/Breakdown Alerts:

Breakout Signals: The script tracks price movements that break support or resistance levels. If the price breaks above a resistance level, the support box is marked as a breakout, and if the price breaks below a support level, the resistance box is marked as a breakdown.

Visual Alerts: Breakouts and breakdowns are visually indicated using "Break Sup" and "Break Res" labels at the relevant price levels. These labels are drawn on the chart, and users can quickly identify price movements through these markers.
Previous Day High and Low:

The Previous Day High and Low levels are plotted on the chart as horizontal lines. These levels serve as reference points for potential price reactions and market sentiment, often acting as dynamic support and resistance levels.
Volume Analysis:

The script includes a volume-based filter, where high volume is used to identify stronger support levels, and low volume is used to mark potential resistance zones. The volume filter helps to confirm the strength of the identified support and resistance levels.
Customizable Settings:

Lookback Period: Users can adjust the lookback period to define how far back the script should look to identify pivot points and support/resistance levels.
Volume Length: The script allows users to modify the length used in the volume analysis to filter out low-volume levels.
Box Width Adjustment: The width of the support and resistance boxes can be customized to adjust their visibility based on the user's preferences.
Visual Enhancements:

The chart is clutter-free with support and resistance levels drawn only when they are significant. The boxes are dynamic, resizing as new data is processed, ensuring that they remain relevant to the current price action.
Buy/Sell Signals are shown using plotshape(), with green arrows for long positions and red arrows for short positions.

Use Case:
Trend Following: The script is ideal for traders who follow trends. The EMAs help identify the prevailing market trend, while the crossover signals can be used to enter trades at the right moment.

Breakout Trading: The support and resistance levels, along with the breakout labels, help traders spot when a price is likely to make a significant move beyond key levels.
Volume Confirmation: The inclusion of volume analysis adds another layer of decision-making, helping traders confirm the strength of support or resistance levels based on trading volume.
Previous Day Levels: The inclusion of previous day high/low levels can act as critical reference points for price action and help traders anticipate future market behavior.


This script offers an all-in-one solution for analyzing trend direction, support/resistance levels, and potential breakout opportunities, making it a powerful tool for technical traders.
Bands and ChannelsMoving AveragesVolume

Script open-source

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.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité