Download MetaTrader 5
To add comments, please log in or register
Deposit to your account in any convenient way. There are 4 of them here!
thien_v
91
thien_v 2012.08.18 12:19 

EXAmple:

double arraytest[5] = { 3, 2 ,5, 6,8 };

ArraySetAsSeries(arraytest,true); // reverse

Print (arraytest[0]);

// Expected result should be 8. 

// but the result is 3.

------ 

Is this a bug? If not I need help.

Get in touch with developers using Service Desk!
Get in touch with developers using Service Desk!
  • www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.
onewithzachy
2271
onewithzachy 2012.08.19 09:34  
thien_v:

EXAmple:

double arraytest[5] = { 3, 2 ,5, 6,8 };

ArraySetAsSeries(arraytest,true); // reverse

Print (arraytest[0]);

// Expected result should be 8. 

// but the result is 3.

------ 

Is this a bug? If not I need help.

 Hi thien_v,

ArraySetAsSeries does not works on static array, Please read the doc https://www.mql5.com/en/docs/array/arraysetasseries

and print it 

Print ("Set as series "ArraySetAsSeries(arraytest,true));

It will print false.

 

Documentation on MQL5: Array Functions / ArraySetAsSeries
Documentation on MQL5: Array Functions / ArraySetAsSeries
  • www.mql5.com
Array Functions / ArraySetAsSeries - Documentation on MQL5
thien_v
91
thien_v 2012.08.19 10:41  
onewithzachy:

 Hi thien_v,

ArraySetAsSeries does not works on static array, Please read the doc https://www.mql5.com/en/docs/array/arraysetasseries

and print it 

It will print false.

 

Hi,

thanks. But how can I reverse static array? Any idea?

Do array in mt5 have address? 

  

onewithzachy
2271
onewithzachy 2012.09.01 10:29  
thien_v:

Hi,

thanks. But how can I reverse static array? Any idea?

Do array in mt5 have address? 

Hi thien_v,

I think either use dynamic Array or reverse the counting (i.e. instead counting from 0 to n, we counting from n to 0). Not really help eh ? :D 

AFAIK, We have no way to find the address of Array in MT5 :(

 

/
To add comments, please log in or register