Questions from Beginners MQL5 MT5 MetaTrader 5 - page 270
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Good afternoon, I have an EA written on mt4 can be remade on mt5
Hello, I have an EA written in mt4, can I convert it to mt5?
Freelancing will help you.
Could you suggest how to write code that the array would store the last 3 prices of the tick. Or give me a link to a program with such or similar code. Thank you in advance.
Forum on trading, automated trading systems and trading strategy testing
Questions from Beginners
tol64, 2014.07.02 18:40
Create an array and then in the OnTick() function check each 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 neighboring ones and place the current price in the first element of the array. Repeat this every tick.I got it, but I can't understand what function is used to move values within the array. I understand that each tick should be compared with the existing one, but how to move them - this is the main question?
If it is different, shift all the values from the last to the neighbouring ones, and put the current price in the first element of the array.
This is not clear!
If it is different, shift all the values from the last to the neighbouring ones, and put the current price in the first element of the array.
This one is not clear!
If it is different, shift all the values from the last to the neighbouring ones, and put the current price in the first element of the array.
This one is not clear!