Download MetaTrader 5
To add comments, please log in or register
All articles are available from MetaTrader 5. Contribute your own one!
sebwelch
18
sebwelch 2015.09.14 03:56 

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 2015.09.14 18:15  
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