creating strategy on bullish candle

Hi Streak,
i am creating a strategy based on the image attached.
testing
1st candle= open is greater than close
2nd candle=open is equal to close
3rd candle= open is equal to previous close of 2nd candle and open of the 3rd candle is greater than close of same candle
4th candle= open is equal to previous close of 3rd candle and greater than the close of the same candle
5th candle= open is greater then previous close and closes above the previous one of the 4th candle.
how to write code for this one?
please help…!!

@Streak

Hi @shreeharsha,

You need to use the below mentioned conditions for this

Entry:
Open higher than Close and
Previous N (Open, 5 min, -5) higher than Previous N (Close, 5 min, -5) and
Previous N (Open, 5 min, -4) equal to Previous N (Close, 5 min, -4) and
Previous N (Open, 5 min, -3) equal to Previous N (Close, 5 min, -4) and
Previous N (Open, 5 min, -2) higher than Previous N (Close, 5 min, -2) and
Previous N (Open, 5 min, -1) equal to Previous N (Close, 5 min, -2) and
Previous N (Open, 5 min, -1) higher than Previous N (Close, 5 min, -1) and
Open higher than Previous N (Close, 5 min, -1) and
Close higher than Previous N (Open, 5 min, -1)

For any other issues, please write to [email protected].

1 Like