Questions from Beginners MQL5 MT5 MetaTrader 5 - page 635
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
Help, please. What's wrong here?
error 'if' - expressions are not allowed on a global scope v.4.1.5(2).mq4 793 3
Gentlemen!
How can I know if the market is closed or not during initialization of an MQL4 Expert Advisor? (what command?)
Help, please. What's wrong here?
The if condition can only be inside a function.
Thank you for responding. This code is inside void OnTick() function, inside the curly brackets. It's far at the top, sorry I didn't copy it. Is that how I understand it? This is a function, right? And there is still an error.
Try this one, it seemed to work once, but I haven't used it:
There is no such command. You could try to place a long-range pending order and then delete it if it does.
Yes, a good option. The team will return a "Market is closed" error.
It's resolved.
Thank you!
Good afternoon, everyone.
Please advise which way to dig, or if you can a piece of code for an example :)
I need the following:
I have an Expert Advisor and an indicator on a chart. How to change indicator parameters with Expert Advisor?
Thanks in advance for the answers.
Good afternoon, everyone.
Please advise which way to dig, or if you can a piece of code for an example :)
I need the following:
I have an Expert Advisor and an indicator on a chart. How to change indicator parameters with Expert Advisor?
Thanks in advance for the answers.
You will not change the indicator settings visually, but when reading data into the Expert Advisor through iCustom from the indicator, you can set parameters that are received by the Expert Advisor from this indicator. Or you can use global variables, if you teach the indicator to use them.