if(TimeCurrent() - OrderCloseTime() == 0)
That seems rather specific and may be unreliable, are you sure that's what you want?
Sleep() after placing an order would mean that the above test could not be true
Dear Ghasem Mohammadi Nemat Abad
if(TimeCurrent() - OrderCloseTime() == 0)
this part of the code only works for one second, i mean timecurrent AND orderclosetime both calculates time based on 1970.01.01 00:00 how many seconds have passed since (read mq4 about time) so if u do subtraction and u want it to be zero then it will work for one second when the order closes the puff timecurrent goes bigger with 1 , so i think ushould change this part, since what if u dont have internet or the comp just offline for whatever the reason, then it wont open the trade!
hope it helped a bit
Onarius

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i wrote this code & its work but just one problem:
some time it send 2 or 3 or more order like order closed.
i want just send 1
thanks for helping