Saidar:
Hey,
I'm trying to figure out how to set an expire time for a pending order. So far that part of my code looks like this:
To my knowledge the expiry date is set at two hours from now. But it does not work the orders won't expire.
Any help will be appreciated.
Thanks!
trade.SellLimit(lot,OrderPrice,_Symbol,SL,TP,ORDER_TIME_SPECIFIED,expire);
This is what jshumaker mean : ORDER_TIME_SPECIFIED (click that). Sometime brokers don't accept expiration date, so be prepare to check the trade result for an error and prepare to delete the order as well.

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
Hey,
I'm trying to figure out how to set an expire time for a pending order. So far that part of my code looks like this:
To my knowledge the expiry date is set at two hours from now. But it does not work the orders won't expire.
Any help will be appreciated.
Thanks!