I have no idea what you are trying to do and I do not believe that your code will compile, so your EA is probably working with whatever code compiled correctly last.
your code looks over your history orders from recent to less recent and if it finds an order that is closed on the same hour of current hour it waits for 50 minutes.
Now what is the problem?
it's not wait 50 minute.it still continuing open order...
int H=TimeHour( OrderClosePrice( ));
|
|

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I want to use time for stop entry order
this is my code:
int d =TimeDay(TimeCurrent());
int h=TimeHour(TimeCurrent());
if(OrdersHistoryTotal()>0){
for(int i=OrdersHistoryTotal(),i>0,i--)
{OrderSelect(Symbol(),h,MODE_HISTORY);
int D=TimeDay(OrderCloseTime());
int H=TimeHour(OrderClosePrice());
if(d=D && H=h){sleep(3000);}}}
the same time,but it's still entry multiple orders at once
how to code it correctly,please help me....