Questions from Beginners MQL5 MT5 MetaTrader 5 - page 268
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
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 >>>
Thanks for the help!
Thank you for your help!
but unfortunately there is no such example.
And the help of course should be seen:Access to timeseries and indicators >>>
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!
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:
Can you tell me what the last two digits in it mean, i.e. 2477 and 0 ?
Need function code like CopyRealVolume etc. can be passed to the array for all bar indicators, but not for the current price!
I saved the data for the currency pair in a text file, here is the first line for example:
Can you tell me what the last two digits in it mean, i.e. 2477 and 0 ?
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.