urgent question please

 
I am very happy that people like u guy are at ons aids. I am a member on this forum and i need to write an EA code to use for my BackTest data
I will not mind if any one could assist. The codes goes thus:
If low & high Bar1,2,3,4>13EMA
If close - Open of Bar 1 + close - open of Bar2 + Close - Open of Bar3 >15
Then
A) set Order Buy 1 Lot
B) Take Profit =Open of current Bar +20
If one of the bar close - open < 2
Then, wait for next bar to be calculated
Reason: