Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 512
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
How can I work with this? I've been sitting here for two days now for nothing. What other solution could there be?
And where did you show a reproducible example? You're just giving us scraps of code. Do we have to compile them into working code at our discretion? What if we don't guess and you need the wrong one?
And where did you show a reproducible example? You only give scraps of code. Do we have to link them into working code at our discretion? What if we don't guess and you need the wrong thing?
OK, but how to do it properly not through an array of structures, but through a CArrayObj class, where the object would be an object of structure type? I don't really understand how to declare and how to add and is this even possible?
OK, but how to do it properly not through an array of structures, but through a CArrayObj class, where the object would be an object of structure type? I don't really understand how to declare and how to add and is this even possible?
Try to describe the problem in general, not in specifics - what you want to get as a result of having this or that data.
Question please. in the OnCalculate(...) handler, the buffer constants open,high,low,close overflow for the entire history one character at a time, what should I do? For example, I want to calculate the value of array mas[i]= open[i] /close[i] for the whole history of one pair and average this value with another character. I searched through a lot of topics, there is not much similar. Can you tell me where to look.
what does overflow mean?
XAUUSD,Daily: array out of range in '!2019.mq4' (243,6) gives out during calculations via constants inOnCalculate, and CopyOpen' - no one of the overloads can be applied to the function call when I try to do like this int prices1=CopyOpen(Symbol(),0,0,Bars(_Symbol,_Period),open); It's very confusing to organize access to data via structures, at what point OHLC takes all quotes and then only new ones, I'm stuck on iOpen(,,,))
So error invalid array access.
There are no arrays or strings in the structure. Only bool, integer, double and enums.
I'm sorry. I got a bit silly. Of course, it will have to be a bit more complicated:
It's not a vector, like in C++. That's why element-by-element copying is required. Also we have to take care of matching the size of the original array and the destination array. That's why the function doesn't get in one line. And it won't always be executed successfully. That's why we need to return the confirmation that it was executed successfully.
XAUUSD,Daily: array out of range in '!2019.mq4' (243,6) gives out during calculations via constants inOnCalculate, and CopyOpen' - no one of the overloads can be applied to the function call when I try to do like this int prices1=CopyOpen(Symbol(),0,0,Bars(_Symbol,_Period),open); It's very confusing to organize access to data via structures, at what point OHLC takes all quotes and then only new ones, stuck on iOpen(,,,))
It doesn't override, and you are addressing a non-existent index.
and how to do it correctly?