OrderSelect(1, SELECT_BY_TICKET
means select ticket no. 1 what of course i assume it doesn't exist
listep:
In the Strategy Tester . . . . NOT Live or Demo, the ticket number for the first Order is 1, after that is closed the next ticket number is 2, then 3, 4 etc. Don't mix up SELECT_BY_TICKET with SELECT_BY_POS
I'm getting this error when I backtest. I think there's a problem handing off the ticket to OrderClose() (obviously). I've just been throwing everything I can at it, but can't figure it out.
Any ideas? Here's (part of) my code:
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
I'm getting this error when I backtest. I think there's a problem handing off the ticket to OrderClose() (obviously). I've just been throwing everything I can at it, but can't figure it out.
Any ideas? Here's (part of) my code: