Do you guys know if this works? Yes, (even without the sleep (unless u get no ticks)).
If OrderDelete works successfully, it means that the order did not fill, correct? Yes.
I just got it to work! And yes without Sleep and I mean that both programmatically and biologically at 3:40 am.
I realize when it's not filled yet the OrderType of the order is a Buy Stop or Sell Stop, but once it fills, the OrderType turns into a Buy or Sell, which gives me an easy conditional check to OrderDelete the order with success!
I didn't even need OrderCloseTime or OrderOpenTime.
:) congrats :)
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
My broker doesn't allow setting expiration dates on pending orders unfortunately (Error 147).
Is there an alternative to remove an order at x minutes if it didn't get filled?
I was thinking I could do the following:
Do you guys know if this works?
Edit: If OrderDelete works successfully, it means that the order did not fill, correct?