The OnCalculate() function has type int so it has to return a value. In your source code the return operator has been missed.
Documentation on MQL5: Language Basics / Functions / Event Handling Functions
- www.mql5.com
Language Basics / Functions / Event Handling Functions - Documentation on MQL5
i've add return(rates_total); thanks Rosh
and now , no errors :)
but the code is not doing anything !

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
Hi all,
I've converted this code from mq4 to mq5
and I'm getting one error that I couldn't get rid off.
It is "'}' - not all control paths return a value"
Please help. Thanks in advance.