OPEN-SOURCE SCRIPT
Diupdate Cross PB

This Pine Script v6 indicator identifies potential trend changes using crossovers of two moving averages (fast and slow), enhanced by a candlestick body confirmation mechanism. It provides two distinct signal types for refined entry/exit points.
Key Features:
Dual Signal System Based on Candle Close:
Alert 1 (Buy/Sell): Triggers after a bullish crossover (fast MA crosses above slow MA) AND a bearish candle (close < open) closes below the fast MA. The inverse applies for a sell signal (bearish crossover + bullish candle + close above fast MA).
Alert 2 (Buy/Sell): Similar to Alert 1, but the candle close condition is checked relative to the slow MA, providing a broader price zone validation.
Moving Average Flexibility: Allows independent selection of length, price source (close, hl2, hlc3, etc.), and type (SMA, EMA, WMA, HMA, ALMA, TMA, TSMA, KAMA, AMA, etc.) for all three moving averages.
Alert Control: Independently enable or disable alerts for buy/sell signals of type 1 and type 2.
Visualization: Plots all three moving averages on the chart for visual tracking of their interactions.
Usage:
The indicator aims to capture the start of trends. The logic of using a bearish candle to confirm a bullish signal (and vice-versa) might represent a dynamic of rejection or consolidation immediately after the crossover before a new trend effectively begins. This can help filter out standard false moving average crossover signals.
Key Features:
Dual Signal System Based on Candle Close:
Alert 1 (Buy/Sell): Triggers after a bullish crossover (fast MA crosses above slow MA) AND a bearish candle (close < open) closes below the fast MA. The inverse applies for a sell signal (bearish crossover + bullish candle + close above fast MA).
Alert 2 (Buy/Sell): Similar to Alert 1, but the candle close condition is checked relative to the slow MA, providing a broader price zone validation.
Moving Average Flexibility: Allows independent selection of length, price source (close, hl2, hlc3, etc.), and type (SMA, EMA, WMA, HMA, ALMA, TMA, TSMA, KAMA, AMA, etc.) for all three moving averages.
Alert Control: Independently enable or disable alerts for buy/sell signals of type 1 and type 2.
Visualization: Plots all three moving averages on the chart for visual tracking of their interactions.
Usage:
The indicator aims to capture the start of trends. The logic of using a bearish candle to confirm a bullish signal (and vice-versa) might represent a dynamic of rejection or consolidation immediately after the crossover before a new trend effectively begins. This can help filter out standard false moving average crossover signals.
Catatan Rilis
Cross PB - Moving Average Crossover Indicator with Candlestick ConfirmationThis Pine Script v6 indicator identifies potential trend reversal or continuation signals based on the most recent crossover of two moving averages (fast and slow), validated by the subsequent candlestick body position.
Key Features:
Last Crossover Logic: The indicator continuously tracks the type (bullish or bearish) and timing of the most recent crossover between the fast and slow moving averages.
Candlestick Confirmation: A signal is triggered only when a new candle meets specific criteria after the last crossover event.
BUY Signal: Generated if the last crossover was bullish (fast MA crossed above slow MA) AND a subsequent candle is bearish (close < open) AND its close is below either the fast MA or the slow MA.
SELL Signal: Generated if the last crossover was bearish (fast MA crossed below slow MA) AND a subsequent candle is bullish (close > open) AND its close is above either the fast MA or the slow MA.
Flexible Moving Averages: Allows independent selection of length, price source (close, hl2, hlc3, etc.), and type (SMA, EMA, WMA, HMA, ALMA, TMA, TSMA, KAMA, AMA, etc.) for all three moving averages (the third is plotted as a reference line).
Configurable Alerts: Separate options to enable/disable the BUY and SELL alerts.
Visualization: Plots all three moving averages on the chart for visual reference.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.