Close All Symbol Function
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
- www.mql5.com
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: