a question about parameter passing

 

first , please forgive my poor english .

my situation is as follows : 


in X.mq5 , i declare an indictator buffer :

                                          double   ExtOpenBuffer[];

and set this buffer :                                         

                                        SetIndexBuffer(0,ExtOpenBuffer,INDICATOR_DATA);

at last , i pass ExtOpenBuffer into a function exported from a dll :

                                        SetBuffer(double& buffer[] , int bufferIndex) ;  // exported from a dll . 

i found buffer is NULL in dll .

BUT , to my confused , when i pass it to another function defined in Y.mqh :

                                       Add(double& buffer[] , int pos){buffer[pos] = 1 ; }

This SUCCEDD . 


so , i fell puzzled for this  ........


thanks in advance .

 
I think article Data Exchange between Indicators: It's Easy might be useful.

 
Rosh posted # :
I think article Data Exchange between Indicators: It's Easy might be useful.

ok , thanks for your reply .

Reason: