Doubt - page 2

 

how to make this happen please tell!!!

It doesn't work. I've been trying the entire weekend but it doesn't wait for 5 minutes....

I've also tested using MA(1) & MA(2).

Ideally it should wait before executing the next trades but it doesn't. What's wrong in the above code.. :(

 

I got it finally....

Thanks everybody for your help...

Regards,

Rohit

 
ksrohit2712:

I placed the EA on demo account and found out that it checks every order in the account history, that leads to delay and on a couple of occasions the order wasn't place at all.

Coding or connection problem. checking history doesn't take time. and you could count down.
 OrderClose(OrderTicket(),OrderLots(),Ask,3,Gold);
   for(int a=0;a<hstTotal;a++)
Your reading out of a buffer. After the order closes, after any server side calls, you MUST RefreshRates() to get current data. Also hstTotal is not updated.
Reason: