'-' - open parenthesis expected

 

please can anyone support me to fix this code it showing that '-' - open parenthesis expected

 for (int i = 1; i < Bars - 1; i++) 

 
nawaf alsaadi:
for (int i = 1; i < Bars - 1; i++) 

Find the 'Bars' you meant in the documentation and post a link to the corresponding documentation page here

 

Hi

Try this:

for (int i = 1; i < Bars(_Symbol, _Period) - 1; i++) {}

You cannot use simply Bars in mq5 – you need to specify symbol and period. Check documentation.

Have a nice day👍📊