Hi
Maybe you have some problems within trade Buystop function, and this feature does not place expiration correctly or perhaps you use some wrong parameters here. Can you show use the code f this function?
Best regards

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 there! I´m coding an EA that should place a BuyStop / SellStop order at a specific price and if it doesn't reach this price it should be cancelled after 2 bars (10 min since im using it on M5 timeframe).
I tried to do that by setting an expiration time but when I test it on the strategy tester it doesn't expire and the order stays forever, even though it displays the right time when I print the 'expiration ' value
Here is the code I'm using:
Can anyone guess what i might be doing wrong?
Is there any other way I can make this order to be cancelled after 2 bars?
Thanks in advance!