Nickbahson:
The following code works but the order is not canceled after the expiration.
I have defined by buySl as a variable and it gets set, how ever my time variable is like it's being ignored
Of course not working, you using Order Time GTC option. Change it to Time Specified.
datetime expiration=TimeTradeServer()+PeriodSeconds(PERIOD_M20); trade.BuyStop(0.10,Ask+100*_Point,_Symbol,buySl,Ask+300*_Point,ORDER_TIME_SPECIFIED,expiration,0);
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
The following code works but the order is not canceled after the expiration.
I have defined by buySl as a variable and it gets set, how ever my time variable is like it's being ignored