Just, at a glance, it seems you are using a lot of undeclared variables. Like int orderticket;
I think you mean here, you want to select by orderticket. If that's the case, maybe you want to use this to get order ticket:
int tradeticket; for(int i=0;i<OrdersTotal();i++) { if(!OrderSelect(i,SELECT_BY_POS)) continue; tradeticket=OrderTicket(); }
Kiril Spiridonov:
Hello! I really need help with my EA.
I show great results on backtesting, but unfortunately, I cannot publish it, because of errors.
I am not a professional programmer and I really need help.
I've copied and pasted some part of the help and I think it helped to solve some errors.
I get error 130 and 4051 and sometimes error 1
Just like Ian said, check all your variables.
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
Hello! I really need help with my EA.
I show great results on backtesting, but unfortunately, I cannot publish it, because of errors.
I am not a professional programmer and I really need help.
I've copied and pasted some part of the help and I think it helped to solve some errors.
I get error 130 and 4051 and sometimes error 1