So simple - why can't I figure it out?!

 

I have been pulling out my hair trying to write a simple EA for a breakout strategy!

The strategy/Expert Advisor needs to work on these simple rules:

(1) Determines the High and Low of the period starting at 3:00 GMT and ending at 7:00 GMT (the "Tracking Period").

(2) Beginning at 7:00 GMT and ending at 13:00 GMT it looks for a breakout from the High or Low of the

Tracking Period. This is the "Trade ssssion". Breakout is defined as price goes 5 pips above the High, or 5 pips below the Low.

(3) Takes a BUY on a breakout from the High and takes a SELL on a breakout from the Low.

(4) Uses a Stop Loss and Take Profit on each trade (15 pips for each).

(5) Takes only ONE trade during the trade session.

That's all there is to it.

Then, the whole thing repeats for a second session, in which:

Tracking Period starts at 10:00 GMT and ends at 14:00 GMT

and the Trade Session is from 14:00 GMT through 20:00 GMT.

Sounds so simple, yet I have not been able to write an EA that gets it right?

I know this Forum has several mq4 programming "wizards", so if I could get some help with this it would be greatly appreciated.

Mike
mvallone2@comast.net

Reason: