You cannot use variable expressions (such as calls to functions) when setting the initial value of an "extern" or "input" variable/parameter. They are presented to the user before execution begins, so they have to be of a constant nature.
You can however, change the value of "extern" parameters within the EA execution, such as in the OnInit() or OnTick(), but you cannot change "input" variables.
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!
I am, obviously unsuccessfully, trying to paste datetime into string:
This raises an error: '+' - constant expected OmChi EA.mq4 76 101
Adding 'const' before datetime does not solve the issue.
Please advise.
Thank you,
Best regards,
Simon
S love nia