OPEN-SOURCE SCRIPT
Atualizado ZLSMA with Chandelier Exit

The "ZLSMA with Chandelier Exit" indicator integrates two advanced trading tools: the Zero Lag Smoothed Moving Average (ZLSMA) and the Chandelier Exit. The ZLSMA is designed to provide a smoothed trend line that reacts quickly to price changes, making it effective for identifying trends. The Chandelier Exit employs the Average True Range (ATR) to establish trailing stop levels, assisting traders in managing risk.
How to Use This Indicator
Trend Identification: Observe the ZLSMA line. If the price is consistently above the ZLSMA, it indicates a bullish trend; if below, it suggests a bearish trend.
Entry and Exit Signals:
Buy Signal: When the price crosses above the Chandelier Exit level and the ZLSMA is trending upwards, consider entering a long position.
Sell Signal: Conversely, when the price crosses below the Chandelier Exit level and the ZLSMA is trending downwards, consider entering a short position.
Risk Management: Adjust your stop-loss levels based on the Chandelier Exit lines to protect profits and limit losses.
Pros:
Responsive to Market Changes: The ZLSMA provides quicker signals than traditional moving averages, allowing traders to capture trends early.
Risk Management: The Chandelier Exit helps traders set dynamic stop-loss levels based on market volatility, enhancing risk management.
Cons:
Lagging Nature: Despite being faster than standard moving averages, ZLSMA and Chandelier Exit can still lag during highly volatile market conditions.
False Signals: In choppy or sideways markets, the indicator may produce false signals, leading to potential losses.
Complexity: New traders may find it challenging to interpret multiple components of the indicator effectively, making it necessary to practice and refine their understanding.
Overall, this indicator is a powerful tool for traders seeking to combine trend-following strategies with effective risk management, but it requires careful consideration of market conditions and proper risk management practices.
How to Use This Indicator
Trend Identification: Observe the ZLSMA line. If the price is consistently above the ZLSMA, it indicates a bullish trend; if below, it suggests a bearish trend.
Entry and Exit Signals:
Buy Signal: When the price crosses above the Chandelier Exit level and the ZLSMA is trending upwards, consider entering a long position.
Sell Signal: Conversely, when the price crosses below the Chandelier Exit level and the ZLSMA is trending downwards, consider entering a short position.
Risk Management: Adjust your stop-loss levels based on the Chandelier Exit lines to protect profits and limit losses.
Pros:
Responsive to Market Changes: The ZLSMA provides quicker signals than traditional moving averages, allowing traders to capture trends early.
Risk Management: The Chandelier Exit helps traders set dynamic stop-loss levels based on market volatility, enhancing risk management.
Cons:
Lagging Nature: Despite being faster than standard moving averages, ZLSMA and Chandelier Exit can still lag during highly volatile market conditions.
False Signals: In choppy or sideways markets, the indicator may produce false signals, leading to potential losses.
Complexity: New traders may find it challenging to interpret multiple components of the indicator effectively, making it necessary to practice and refine their understanding.
Overall, this indicator is a powerful tool for traders seeking to combine trend-following strategies with effective risk management, but it requires careful consideration of market conditions and proper risk management practices.
Notas de Lançamento
Struggling to get in on a trade? Don't know where to take profits? This indicator might help - it only displays the Buy, Stop Loss and Take profit points when certain conditions are met.The indicator combines a moving average crossover strategy with trend analysis to identify potential buy opportunities in the market. It utilises a short-term and long-term Simple Moving Average (SMA) to generate buy signals when the short-term SMA crosses above the long-term SMA. Additionally, it displays take profit and stop loss levels, along with a background colour indicating the overall trend strength.
Pros:
Clear Signals: Provides straightforward buy signals based on a well-known crossover strategy, making it easy for traders to identify entry points.
Visual Aids: The inclusion of take profit and stop loss levels, along with background trend colors, enhances decision-making and risk management.
Trend Awareness: The background colour changes based on trend strength, allowing traders to quickly assess market conditions.
Cons:
Lagging Indicator: Moving averages are inherently lagging, which can result in delayed signals, especially in volatile markets.
False Signals: Crossover strategies can produce false signals during sideways or choppy market conditions, leading to potential losses.
Limited Scope: The indicator focuses primarily on buy signals, potentially missing out on other trading opportunities (like short-selling) in a bearish market.
Overall, while this indicator can be a useful tool for identifying bullish trends and potential entry points, traders should use it in conjunction with other analysis methods and risk management strategies to mitigate its limitations.
Notas de Lançamento
Hello, I've made a few key Improvements:Buy/Sell Signals 1 Candle Before, Offset.
The plotshape functions for buy and sell signals now use offset=-1 to display the signals one candle before the actual crossover.
The longStop_ce[1] and shortStop_ce[1] ensure the signals are plotted at the correct price levels.
Simplified Background Highlighting:
Replaced the fill logic with bgcolor for a cleaner and more efficient way to highlight the background based on the trend direction.
Cleaner Code Structure:
Removed redundant variables and streamlined the logic for plotting and alerts.
Dynamic Labels:
The buy/sell labels are now displayed dynamically based on the showLabels_ce input.
Alerts:
Added alerts for buy and sell signals, which can be configured in TradingView.
Notas de Lançamento
image updateNotas de Lançamento
New updates added - Summary of Updates and Fixes:
Added Optimum Exit Signals with MACD Confirmation
The script now generates an Optimum Exit Signal when a MACD crossover occurs.
Blue triangle up/down labels indicate the best exit points.
Volume Confirmation for Stronger Exit Signals
Exit signals are validated using volume data.
If volume is 1.5x higher than its 20-period SMA, an orange triangle highlights a strong exit.
Offset Buy and Sell Signals by 3 Candles
Added a 3-bar offset to delay buy and sell labels, improving accuracy.
Alerts for Key Events
Alerts now trigger for:
Buy/Sell Signals
Optimum Exit (MACD-based)
Strong Exit (MACD + Volume confirmation)
Ensured the Indicator Does Not Repaint
No bar_index manipulation.
Uses only confirmed data from past bars, ensuring non-repainting signals.
Notas de Lançamento
Just updated the ZLSMA + Chandelier Exit indicator. It now includes a non-repainting early-warning system that displays buy and sell labels before the actual Chandelier Exit signal is confirmed. This is done using a new “signal offset” system that shifts signals backward in time (into the past), ensuring the label appears several bars before the real confirmation instead of after it. The Chandelier Exit stop lines are now fully restored and displayed on the chart, allowing you to visually track long/short bias and dynamic trailing stops. Pre-signals (yellow triangles) warn you when a Chandelier flip is close to triggering, while confirmed signals (green/red labels) display when the bias officially changes. Strong exit signals (orange markers) have been added using volume confirmation to identify high-conviction reversals. All calculations—including ZLSMA, ATR, and Chandelier logic—are non-repainting, meaning the indicator prints signals accurately and reliably without changing historical values.Notas de Lançamento
new imageScript de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.