Michele Bordi: '<' - open parenthesis expected v1.mq5 85 12
-
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
Messages Editor
Forum rules and recommendations - General - MQL5 programming forum (2023) -
if(Bars < 3) return;
There is no predefined variable name Bars.

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
Message:
Hi everyone,
I'm developing an Expert Advisor in MQL5 and I'm getting this compilation error:
The problem persists even though I've double-checked the syntax, parentheses, and braces. The error seems to be related to the following portion of the code, but I can't figure out the real cause:
The compiler points to a later line, such as:
But even when I properly complete the logic with the expected parentheses and blocks, the error still shows up.
What I've already tried:
Verified all parentheses and braces are balanced
Added the missing variables: ulong ticket; and bool isOpen = GetOpenPositionDetails(...);
Reviewed the entire OnTick() function for logic issues or missing brackets
Question:
What is the real cause of this error, and how can I fix it?
Any suggestions on where else to look?
Thanks in advance for any support!