After reading through the code again, I realized that I have copied it into the ontick function. When I get home tonight I will remove it from the ontick function and try again. Could this be the reason I get the errors?
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893

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
Good day
I need help please . I'm still new to coding and is learning by watching you tube videos and reading the MQL5 Language REFERENCE.
i want to create a EA that can trade with trend lines and found this code in the reference on page 399, but after i moved the #property and input variable's to global scope it gives me this "function declarations are allowed on global, namespace or class scope only" error