Kindly send code for below strategy

(After 3 consecutive candes ( red or green ), look for double volume candle , and then wait for two consecutive candles of the same colour and trigger .)

DOWNWARD RALLY – Continuous 3 RED Color CANDLES
UPWARD RALLY – Continuous 3 GREEN Color Candles

BUYING

  1. We need a DOWNWARD RALLY
  2. We need a Double Volume Candles (Any Color)
  3. We need 2 COntinuos Green Color Candle
    or We need a One Green Color Candles which closes above the Previous Candle’s High

FOR SELL : VICE-VERSA.

As per the above condition,

Buy Script:

REF(CLOSE,1)>REF(OPEN,1) AND REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,3)>REF(OPEN,3) AND TREND(CLOSE, 5) = UP

Sell Script:

REF(CLOSE,1)<REF(OPEN,1) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,3)<REF(OPEN,3) AND TREND(CLOSE, 5) = UP

verify your condition again, i think you are confused with trend and bulish candles