Questions from Beginners MQL5 MT5 MetaTrader 5 - page 896
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
Please help with the error.
Error text "2018.07.05 15:21:32.080 StBB0 (EURUSD,M5) array out of range in 'StBB0.mq5' (139,33)"
I don't understand why values for the whole array are calculated, though I've explicitly specified only the first 5 candlesticks (replacement with values_to_copy doesn't help).
Please help with the error.
Error text "2018.07.05 15:21:32.080 StBB0 (EURUSD,M5) array out of range in 'StBB0.mq5' (139,33)"
It's unclear why the values are calculated for the entire array, even though I've explicitly selected only the first 5 candlesticks (replacement with values_to_copy doesn't help).
Where is it wrong? Please mark the line with the colour.
О!
Why is the DIGITAL "0" compared to the number "5"?
О!
And why is the DIGITAL "0" compared to the number "5"?
I got confused, replaced it with "bar<values_to_copy ", everything works)
Thank you!
The solution is as follows: in the signals module
In the Expert Advisor that was generated by the MQL5 Wizard:
Bottom Line:
Vladimir, thank you for the code - everything works! The only question that remains is why my enum cannot be declared directly in the signals module, but only in the main Expert Advisor's code.
Vladimir, thanks for the code - everything works! Only one question remains - why can't I declare my enum directly in the signal module, but only in the main EA code?
I don't know. I would only assume that at the time when signal modules were invented, no one thought that enum could be used as a variable type. That is, it wasn't provided for.
Yeah, I guess so. And it takes enums from the MAs of the standard library and you can put them right into the description of your signal module.
I meant that the custom enum was not provided.
Yes, but the built-in enums from MA are!
Forum on Trading, Automated Trading Systems and Strategy Tests
FAQ from Beginners MQL5 MT5 MetaTrader 5
Vladimir Karputov, 2018.07.05 15:44
I meant that custom enum were not provided.