EA identify three or more bull/bear candles in a row

 

Hi,

 

I am trying to code and EA that identifies three or more bull/bear candles in a row.

I am having trouble trying to plan it out and code it.

 

Any help will be greatly appreciated

Thank you in advance

 
sebwelch:

Hi,

 

I am trying to code and EA that identifies three or more bull/bear candles in a row.

I am having trouble trying to plan it out and code it.

 

Any help will be greatly appreciated

Thank you in advance

if(Open[3]<Close[3] && Open[2]<Close[2] && Open[1]<Close[1])   //3 bulls
 {

 }

if(Open[3]>Close[3] && Open[2]>Close[2] && Open[1]>Close[1])   //3 bears
 {

 }
Alternatively, write a loop.