PROTECTED SOURCE SCRIPT
Custom Stock Indicator with Bollinger Bands

9, 20, 50, 200 sma, Bollinger bands, MACD bullish crossover signal (blue dot) and candle counting
This TradingView indicator overlays on the price chart to provide trend analysis, volatility bands, momentum signals, and a consecutive candle counter for bullish sequences above the 9-period SMA. Key features include:
Moving Averages:
9-period SMA (green line).
50-period SMA (orange line).
200-period SMA (red line).
20-period SMA (yellow line, used as Bollinger Bands basis).
Bollinger Bands:
Standard 20-period SMA basis with 2 standard deviations.
Gray upper and lower bands with a semi-transparent gray fill (90% transparency) for volatility visualization.
MACD Bullish Crossover Signal:
Uses default MACD (12, 26, 9).
Tiny electric blue circles plotted below the bar (shifted down by 2 bars) when the MACD line crosses above the signal line, indicating potential bullish momentum.
Candle Counter for Bullish Sequence:
Activates only when SMA9 > SMA200 (alignment condition).
Starts/Increments: When the entire candle (including wicks: low > SMA9) fully closes above the SMA9.
Stops/Resets: When the entire candle (high < SMA9) fully closes below SMA9.
Straddling Candles (overlapping SMA9): Continues incrementing the count if the sequence has already started; otherwise, stays at 0.
Displays small white number labels (e.g., "1", "2") above the high of the current bar if count > 0, ensuring immediate visual feedback on historical and real-time bars.
The script is lightweight, focuses on bullish confirmation (e.g., for stocks like AMD), and avoids clutter by using tiny shapes and transparent fills. It evaluates conditions on the current bar for accurate historical counting without delays. No RSI signals are included, as per the latest updates. To use, paste into TradingView's Pine Editor and apply to a chart.
This TradingView indicator overlays on the price chart to provide trend analysis, volatility bands, momentum signals, and a consecutive candle counter for bullish sequences above the 9-period SMA. Key features include:
Moving Averages:
9-period SMA (green line).
50-period SMA (orange line).
200-period SMA (red line).
20-period SMA (yellow line, used as Bollinger Bands basis).
Bollinger Bands:
Standard 20-period SMA basis with 2 standard deviations.
Gray upper and lower bands with a semi-transparent gray fill (90% transparency) for volatility visualization.
MACD Bullish Crossover Signal:
Uses default MACD (12, 26, 9).
Tiny electric blue circles plotted below the bar (shifted down by 2 bars) when the MACD line crosses above the signal line, indicating potential bullish momentum.
Candle Counter for Bullish Sequence:
Activates only when SMA9 > SMA200 (alignment condition).
Starts/Increments: When the entire candle (including wicks: low > SMA9) fully closes above the SMA9.
Stops/Resets: When the entire candle (high < SMA9) fully closes below SMA9.
Straddling Candles (overlapping SMA9): Continues incrementing the count if the sequence has already started; otherwise, stays at 0.
Displays small white number labels (e.g., "1", "2") above the high of the current bar if count > 0, ensuring immediate visual feedback on historical and real-time bars.
The script is lightweight, focuses on bullish confirmation (e.g., for stocks like AMD), and avoids clutter by using tiny shapes and transparent fills. It evaluates conditions on the current bar for accurate historical counting without delays. No RSI signals are included, as per the latest updates. To use, paste into TradingView's Pine Editor and apply to a chart.
Geschütztes Skript
Dieses Script ist als Closed-Source veröffentlicht. Sie können es kostenlos und ohne Einschränkungen verwenden – erfahren Sie hier mehr.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Geschütztes Skript
Dieses Script ist als Closed-Source veröffentlicht. Sie können es kostenlos und ohne Einschränkungen verwenden – erfahren Sie hier mehr.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.