Hi,
I am looking to create a simple one-dimensional array that holds the current price of a pair when a condition is met and then repeats the cycle continuously for as long as the EA runs.
The array size can be modified by specifying it as an input when needed and every new price occupies the first array cell while moving the older prices back.
How do I reference the cell that I need for calculations in the EA. Please help me with this inquiry and make as clear as possible with example(s) if you can, thanks.
Illustration with a 5 cell array:
Cell 1 Cell 2 Cell 3 Cell 4 Cell 5
After first 30 seconds Price 1 0 0 0 0
After second 30 seconds Price 2 Price 1 0 0 0
After third 30 seconds Price 3 Price 2 Price 1 0 0
After fourth 30 seconds Price 4 Price 3 Price 2 Price 1 0
After fifth 30 seconds Price 5 Price 4 Price 3 Price 2 Price 1
After sixth 30 seconds Price 6 Price 5 Price 4 Price 3 Price 2
After seventh 30 seconds Price 7 Price 6 Price 5 Price 4 Price 3
After eighth 30 seconds Price 8 Price 7 Price 6 Price 5 Price 4
After ninth 30 seconds Price 9 Price 8 Price 7 Price 6 Price 5
After tenth 30 seconds Price 10 Price 9 Price 8 Price 7 Price 6
And so on and so forth...