Download MetaTrader 5

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

To add comments, please log in or register
sebwelch
18
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

DeanDeV
330
DeanDeV  
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.
To add comments, please log in or register