Download MetaTrader 5

How to analyze 3 previous bars

To add comments, please log in or register
SugarLandFX
7
SugarLandFX  
I want to write an EA but I need to know how to analyze the 3 previous bars every time a new bar opens...I just need to know if the 3 bars are all bullish...I can add the code I need from there...Any examples would be great...Thanks
Umar Ismail
11903
Umar Ismail  
SugarLandFX:
I want to write an EA but I need to know how to analyze the 3 previous bars every time a new bar opens...I just need to know if the 3 bars are all bullish...I can add the code I need from there...Any examples would be great...Thanks
if(Open[1]<Close[1]&&Open[2]<Close[2]&&Open[3]<Close[3]) bool bullis =true;
To add comments, please log in or register