Multidimensional Arrays
-
Hi everyone,
I need to declare and use multidimensional arrays (which are obviously supported by MQL4, up to four dimensions):
https://book.mql4.com/variables/arraysThe problem rises when you declare an array with more than one dimension in fxDreema's Project Variables. It gets trimmed to one dimension after you apply your changes.
var_array[10][2] => var_array[10]I'd appreciate if anyone would share his/her solution to this problem, @fxDreema and @miro1360 help needed

-
this functionality can add only @fxDreema
-
I can check that
-
@fxdreema eagerly waiting to see it implemented, thanks

-
Hey, is this implemented in fxdreema yet? I'd like to make an array that has separate "rows" for each pair.
-
yes it is implemented
https://fxdreema.com/shared/5rvzn7pN -
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 1After 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 6And so on and so forth...
-
Here you have a good insight on arrays in fxDreema:
-

-
Can you give me an idea on how I can fill the following two arrays (both one dimensional).
VAR X is the input to the first index of array one and the first index of array two is the input to the second index of array one and so on and so forth as shown.
I also want to be able to expand the array size from 5 to 10 or any other number if need be. Thanks

-
@l-andorrĂ Hi, this is what I am trying to achieve, the link you referenced me to did not help me much. Can you give me an idea on how I can fill the following two arrays (both one dimensional).
VAR X is the input to the first index of array one and the first index of array two is the input to the second index of array one and so on and so forth as shown.
I also want to be able to expand the array size from 5 to 10 or any other number if need be. Thanks

-
Man, I'm still learning how array works.
What you want goes beyond my comprehension, I'm afraid. I hope roar can give us a hand, because I find this very interesting.