Good morning,
As the title indicates, I have errors in my program that I cannot correct.
If someone can help me that would be great :)
Here are the errors:
'Close' - invalid array access My Boll2.mq4 37 33
'totalOrders' - undeclared identifier My Boll2.mq4 37 55
'else' - illegal 'else' without matching 'if' My Boll2.mq4 48 5
'else' - illegal 'else' without matching 'if' My Boll2.mq4 59 5
'else' - illegal 'else' without matching 'if' My Boll2.mq4 69 5
'Close' - access to invalid bay My Boll2.mq4 37 33
Thank you in advance for your help.
Good day
Please don't post randomly in any section. Your question is not related to the section you posted.
MT4/mql4 has it's own section on the forum.
I will move your topic to the correct section shortly, please don't create another topic.
You are missing array index on Close in every "if" condition.
if (Close[1] < lowerBand && Close > middleBand && totalOrders < 50)
You have ";" after each for loop expression - orders after that are executed only once and that's the reason why you have "illegal else" errors.
for (int i=0;i<50;i++);
You are missing "#property strict" and because of that you will get "variable already defined error" error
Besides that, this code is not complete - where is "totalOrders" variable declaration?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use