In MQL5, there is no predefined variable called "Bars". It is a function in MQL5:
Returns the number of bars count in the history for a specified symbol and period
int Bars( string symbol_name, // symbol name ENUM_TIMEFRAMES timeframe // period );
int Bars( string symbol_name, // symbol name ENUM_TIMEFRAMES timeframe, // period datetime start_time, // start date and time datetime stop_time // end date and time );
In other words, your code at line 14 should look as follows ...
// check if minimum bars are loaded if ( Bars( _Symbol, _Period ) < 3 ) return;

Documentation on MQL5: Timeseries and Indicators Access / Bars
- www.mql5.com
Bars - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5

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
Hello im having some issues on line 14 column 14 after running it keeps giving me the same error of '<' open parenthesis expected. I have no clue how to fix this please help me ou