- You can't close pending orders, you have to delete them.
- So fix it. Comment out the delete call. You haven't stated a problem. Show us your attempt
(using CODE button) and state
the nature of your problem.
No free help
urgent help. - Next time write a better title so it can be searched for.
Paul9:
hi all, I found an helpful free Expert which closes orders after a set time, unfortunately it delete too pending orders!
I would like it to close only the opened trade.
Someone know how to solve this problem changing the code?
thanks
If you just don't want the Expert to delete pending orders you should delete this block from your code.
if (OrderType()>1 && OrderType()<6) {//pending orders result=OrderDelete(OrderTicket()); if (result) Print("TimeBasedSL(): **** Pending Order ticket "+OrderTicket()+" (opentime: "+TimeToStr(OrderOpenTime())+") deleted (timebased SL="+DoubleToStr(TimeBasedSLperiod,2)+" "+smode+")"); }
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
hi all, I found an helpful free Expert which closes orders after a set time, unfortunately it delete too pending orders!
I would like it to close only the opened trade.
Someone know how to solve this problem changing the code?
thanks