- Please use the SRC-button to post code!
- I have no idea why and what for you coded that, what you expect and what it does.
Line 2 is a comment. | //+------------------------------------------------------------------+ //| Copyright ?2005, MetaQuotes Software Corp. | //| #include <pluginAB.mqh> | //+------------------------------------------------------------------+ #import "Exp.dll" int SetRateArray(double &rates[][6],int,string,int,int);// rate array,array length,symbol name,period,readlen // if readlen is 0, realtime mode // if readlen>0,histrical mode int SetHost(string,int);//IP ,port |
Line 47 is a comment | ArrayCopyRates(rates); //ret=GetRatesItemValue(rates,10,1,1); rcnt=GlobalVariableGet(Symbol()+"_len"); |
The code you posted, does not match the error message you provided. | 'pluginAB.mqh' pluginAB.mqh 1 1 arrays passed by reference only pluginAB.mqh 2 27 variable 'f' not used pluginAB.mq4 47 9 0 error(s), 2 warning(s), compile time: 89 msec 1 3 |
Hi whroeder1
#import "Exp.dll" int SetRateArray(double rates[][6],int,string,int,int);// rate array,array length,symbol name,period,readlen // if readlen is 0, realtime mode // if readlen>0,histrical mode int SetHost(string,int);//IP ,port
Please have a look at the error code .
'pluginAB.mq4'
'pluginAB.mq4'
arrays passed by reference only pluginAB.mqh
Either define this array as a 'global' array then you can access it without passing it over as a parameter to the function, or just use a reference, what's wrong with it?
"passed by reference" means only that in the function does not exists a copy of that array and all what you do with it in the function happens to the original.
Hi whroeder1
Please have a look at the error code .
'pluginAB.mq4'
'pluginAB.mq4'
arrays passed by reference only pluginAB.mqh
Change to this:
#import "Exp.dll" int SetRateArray(double &rates[][6],int,string,int,int);// rate array,array length,symbol name,period,readlen // if readlen is 0, realtime mode // if readlen>0,histrical mode int SetHost(string,int);//IP ,port
Hi whroeder1
Please have a look at the error code .
'pluginAB.mq4'
'pluginAB.mq4'
arrays passed by reference only pluginAB.mqh
That is not an error - it states there that it is a warning (and a benign warning - unless you try to change some of the array elements in the called function(s), in which case you will scratch your head)
Do as honest_knave told you to avoid that compiler warning
That is not an error - it states there that it is a warning (and a benign warning - unless you try to change some of the array elements in the called function(s), in which case you will scratch your head)
Do as honest_knave told you to avoid that compiler warning
Hi Carl Schreiber honest_knave Mladen Rakic
Thank you very much to help me.
pluginAB.mq4 MT4 test by now, but from the DLL data without work ,
Some of the called function is to change the array elements,

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
-----------------------------------------------------------
'pluginAB.mqh' pluginAB.mqh 1 1
arrays passed by reference only pluginAB.mqh 2 27
variable 'f' not used pluginAB.mq4 47 9
0 error(s), 2 warning(s), compile time: 89 msec 1 3
Don't work requests for help .
____________________________________________________________________________
Moderator Note: Please use the SRC button next time. I have edited it for you this time: