How to analyze 3 previous bars

 
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
 
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;