Im looking ea what would close all open and pending orders in specific time.
Example I want all orders close at 9 PM GMT???
Try to incorporate the following snippet in your code.
In the main body,
if(CurTime() >= expiration) CloseAll();
And the CloseAll routine is:
int trade, c, err, NumberOfTries=100;
if(OrderType()==OP_SELL || OrderType()==OP_BUY)
for(c = 0 ; c < NumberOfTries ; c++)
if(err==4 || err==137 ||err==146 || err==136) //Busy errors
else //normal error
no i am looking separate ea. I dont want to add anything
So you don't have any EA? do you have your own system? if yes you can ask somebody here or pay somebody outthere to coding it. If no, my suggestion is.. create your system, tweak it until it's profitable in the long run, then learn mql4 programming or pay somebody to create an EA based on it. To write an EA maybe a lot simpler than create or tweak a good system that suit you.
Learn and learn is the only way to survive. Maji already assist you to write that code. Market is always changing, today's best EA may save you for a while, someday it won't suit the market anymore. If you have a proper forex knowledge, you can tweak it until it's profitable again, and create a new EA again. Better to learn fishing rather than asking for a fish.
Just my 2 cents