OPEN-SOURCE SCRIPT

Breakout & Distribution Detector

How the Script Works:

1. Bollinger Bands:
• The upper and lower Bollinger Bands are used to detect volatility and potential breakouts. When the price closes above the upper band, it’s considered a bullish breakout. When the price closes below the lower band, it’s a bearish breakout.
2. RSI (Relative Strength Index):
• The RSI is used for momentum confirmation. A bullish breakout is confirmed if the RSI is above 50, and a bearish breakout is confirmed if the RSI is below 50.
• If the RSI enters overbought (above 70) or oversold (below 30) levels, it signals a distribution phase, indicating the market may be ready to reverse or consolidate.
3. Moving Average:
• A simple moving average (SMA) of 20 periods is used to ensure we’re trading in the direction of the trend. Breakouts above the upper Bollinger Band are valid if the price is above the SMA, while breakouts below the lower Bollinger Band are valid if the price is below the SMA.
4. Signals and Alerts:
• BUY Signal: A green “BUY” label appears below the candle if a bullish breakout is detected.
• SELL Signal: A red “SELL” label appears above the candle if a bearish breakout is detected.
• Distribution Phase: The background turns purple if the market enters a distribution phase (RSI in overbought or oversold territory).
• Alerts: You can set alerts based on these conditions to get notifications for breakouts or when the market enters a distribution phase.
Bollinger Bands (BB)Exponential Moving Average (EMA)

開源腳本

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

想在圖表上使用此腳本?

免責聲明