a question about parameter passing New comment FuliangQ 2010.03.17 11:38 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 . How to pass ENUMs as variable function parameters [ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. How to pass arrays to C++, found C# DLL tutorial Rashid Umarov 2010.03.17 12:08 #1 I think article Data Exchange between Indicators: It's Easy might be useful. FuliangQ 2010.03.17 16:34 #2 Rosh posted # : I think article Data Exchange between Indicators: It's Easy might be useful.ok , thanks for your reply . New comment
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 .