Cross PBThis 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.
Pine Script® Indikator






















