using two dimentional array with CopyRates

Back to topics list To post a new topic, please log in or register
avatar
5
tfoller 2016.06.23 15:50
 

How do I pass a sub-array of a two dimensional array into CopyRates? The code below doesn't work

MqlRates c[3][200];

CopyRates("AUDUSD", 0, 0, 200, c[0]);

avatar
2017
gooly 2016.06.23 15:56 #
 

What about reading in the editor's reference (hint F1 if the mouse is of the mt4-function) about MqlRates and CopyRates.

What are their dimensions?

avatar
5
tfoller 2016.06.23 17:20 #
 
gooly:

What about reading in the editor's reference (hint F1 if the mouse is of the mt4-function) about MqlRates and CopyRates.

What are their dimensions?

You can pass either dynamic array or static if you know the size. I know the size. So if I pass one dimensional array like MqlRates c[200]; CopyRates("AUDUSD", 0, 0, 200, c); that will work. What I need is to pass a sub array from two dimensional array. In C passing the first row of a two dimensional array into a function would be c[0], in mql it doesn't seem to work this way?
avatar
2017
gooly 2016.06.23 20:11 #
 
You can't pass a part of an array. Either totally: double &arr[][][] or a single value: double &arr[1][3][6] (I think - haven't checked it!!)
Back to topics list  

To add comments, please log in or register