Questions from Beginners MQL5 MT5 MetaTrader 5 - page 268

 
soroko:

Can you tell me how to create a dynamic time-series array to store the last 5 prices.

Have a look at this article, it contains many examples:Fundamentals of MQL5 - Arrays >>>
 
tol64:
Have a look at this article, it contains many examples:Fundamentals of MQL5 - Arrays >>>

Thanks for the help!

 
soroko:

Thank you for your help!

But unfortunately there is no such example.
 
soroko:
but unfortunately there is no such example.
And of course you need to look at the help:Access to timeseries and indicators >>>
 
tol64:
And the help of course should be seen:Access to timeseries and indicators >>>
I've already read it all, I've been racking my brains about it all day.
 
soroko:
I've already read everything, I've been racking my brains over it all day.

I need a function code similar to CopyRealVolume etc. I can pass to the array all indicators for the bar, but not for the current price!

 
tol64:
For example: Main menu > File > Save... Or just press Ctrl + S.

I saved the data for the currency pair in a text file, here is the first line for example:

2010.01.11 13:00,1.61745,1.61874,1.61619,1.61646,2477,0

Can you tell me what the last two digits in it mean, i.e. 2477 and 0 ?

 
soroko:

Need function code like CopyRealVolume etc. can be passed to the array for all bar indicators, but not for the current price!

Create an array and then in the OnTick() function check every tick if the price has changed, comparing the current price with the price in the first [0] element of the array. If it is different, then shift all values starting from the last one to the neighbour ones and place the current price in the first element of the array. And so every tick.
 
aest:

I saved the data for the currency pair in a text file, here is the first line for example:

2010.01.11 13:00,1.61745,1.61874,1.61619,1.61646,2477,0

Can you tell me what the last two digits in it mean, i.e. 2477 and 0 ?

Tick and real volume (if any).
 
tol64:
Create an array and then in the OnTick() function check each tick to see if the price has changed by comparing the current price with the price in the first [0] element of the array. If it is different, then shift all values starting from the last one to the neighboring ones and place the current price in the first element of the array. This should be done every tick.
I understood that, but how to shift the price within the array. I tried it with the ArrayCopy function, it transfers 0.0 or the same Bid. And I'm also worried about the massive code, can't it all be done with one function?