predefined variable "Bars"

 

gives me the following error:

'<' - open parenthesis expected

this is the context:

if (Bars < 5) return;

If I remove this line there are 0 errors. It's a simple EA (MQL5) based on the famous pattern "IDNR4" (Inside day narrow range 4).

thanks, kind regards

Improperly formatted code edited by moderator. Please use the CODE button (Alt-S) when inserting code or log output.

Code button in editor

 

In MQL5, there is no predefined variable called "Bars". That is from the older MQL4. Instead use the function ...

Documentation on MQL5: Timeseries and Indicators Access / Bars
 

thank you.

I've been learning the past few months...