Toriacht:
Once a pending order has been triggered, its type changes to OP_BUY or OP_SELL - i.e. OP_BUYLIMIT and OP_BUYSTOP become OP_BUY; OP_SELLLIMIT AND OP_SELLSTOP become OP_SELL. The open time also gets changed from the time of placement to the time of fill. (Putting it another way, once a pending order has been filled, you can't tell from the MT4 order details alone whether it was originally a limit or a stop, and when it was placed rather than filled.)
How can i check if a pending order has been triggered? I have two pending orders and want to cancel one if the other opens but can't see a method to check if the order has been triggered?
use unique order magic number for every pending order when OrderSend().
if poll orders frequently, int OrderMagicNumber() will allow mapping the two orders. int OrderType() will give values according to current status as jjc details.
thanks guys... i appreciate the help
T
Comments that do not relate to this topic, have been moved to "Displaying current trades [MT5]".
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,
How can i check if a pending order has been triggered? I have two pending orders and want to cancel one if the other opens but can't see a method to check if the order has been triggered?
Thanks,
Tori