Jhon Bronxe:
Hello, so i've created a close all symbol function but for some unknown reason it's producing alot of errors such as 'PositionClose' - undeclared identifier, ')' - unexpected token, 'PositionClose' - some operator expected, expression has no effect, '.' - struct or class type expected. I have inserted Ctrade trade above on the int OnInit().
Here is the code:
difficult to say what all your errors are as you have not included all the code, but the following line is gibberish so you should start there..
for(trade=PositionsTotal()-1, orders=OrdersTotal()-1;trade>=0, orders>=0;trade--,orders--)
https://www.mql5.com/en/docs/basis/operators/for
Documentation on MQL5: Language Basics / Operators / Loop Operator for
- www.mql5.com
Loop Operator for - Operators - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
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, so i've created a close all symbol function but for some unknown reason it's producing alot of errors such as 'PositionClose' - undeclared identifier, ')' - unexpected token, 'PositionClose' - some operator expected, expression has no effect, '.' - struct or class type expected. I have inserted Ctrade trade above on the int OnInit().
Here is the code: