ArraySetAsSeries doesnt work| Admin?

 

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.
 
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
 
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? 

  

 
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 :(

 

Reason: