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
Why not . . .
Not tested or tried to compile it . . .
Sneaky! You are going back to the beginning of the loop when you find the valid trade. That is clever.
I would never compare to #define'd symbols with greater than or lesser than. They are symbolic forms and relying on their actual values is poor programming practice. Gain 1 point for sneaky trick and lose two for using greater/lesser comparison on #defined symbols :-)
Sneaky! You are going back to the beginning of the loop when you find the valid trade. That is clever, although you would want to use
pos= OrdersTotal()-1; <<<
I would never compare to #define'd symbols with greater than or lesser than. They are symbolic forms and relying on their actual values is poor programming practice. Gain 1 point for sneaky trick and lose two for using greater/lesser comparison on #defined symbols :-)
You check in one time not only if there are open buys and/or sells (nOpenOrders)
but also the total with pending include (EAtrades)
Only when nOpenOrders > 0 and when the total trades > nOpenOrders you have to delete the pending
In that case the check is done atonce
If all pending are deleted the next tick this loop for deleting pending will not be done again.....
I think it is faster...
Agree nice the coding of RaptorUK fine solution for it.....
<<< I wondered about that, wasn't sure if it would then be decremented by the for loop next run through . . . making it OrdersTotal() - 2