Wrong values received by MQL5 iCustom function

To add comments, please log in or register
jaffer wilson
767
jaffer wilson  

I am trying to call the MQL4 indicator with MQL5 using iCustom() .

int test = iCustom(_Symbol,_Period,"ADXmagic.ex4");

I have copies the two buffers with number 0 and in the a and b of double type.

   CopyBuffer(test,0,0,5,a);
   CopyBuffer(test,1,0,5,b);
   ArrayPrint(a);
   ArrayPrint(b);

But the output received is completely garbage and no values:

 6E+39    2E+92  0.00000 +0.00000 +0.00000
4E+230  0.00000 +0.00000 +0.00000 +0.00000
 6E+39    2E+92  0.00000 +0.00000 +0.00000
4E+230  0.00000 +0.00000 +0.00000 +0.00000
 6E+39    2E+92  0.00000 +0.00000 +0.00000
4E+230  0.00000 +0.00000 +0.00000 +0.00000
 6E+39    2E+92  0.00000 +0.00000 +0.00000
4E+230  0.00000 +0.00000 +0.00000 +0.00000

Kindly, let me know am I correct on calling the indicator? Is there a flaw I made?

Joe Fung
11
Joe Fung  
I tried to call the mql5's iCustom function using mql4 and error results, probably mql4 and mql5 are not compatible
jaffer wilson
767
jaffer wilson  
Joe Fung:
I tried to call the mql5's iCustom function using mql4 and error results, probably mql4 and mql5 are not compatible

I guess you got me wrong.... I am calling the ex4 indicator file with iCustom() in MQL5.

Alexey Volchanskiy
28238
Alexey Volchanskiy  
jafferwilson:

I guess you got me wrong.... I am calling the ex4 indicator file with iCustom() in MQL5.

I advise after a questionable operation to call a function GetLastError :)

whroeder1
17944
whroeder1  
jafferwilson: I am calling the ex4 indicator file with iCustom() in MQL5.

You can't run a ex4 in MT5

jaffer wilson
767
jaffer wilson  
Alexey Volchanskiy:

I advise after a questionable operation to call a function GetLastError :)

Thank you for your advise sir. I will keep this in mind while programming.

jaffer wilson
767
jaffer wilson  
whroeder1:

You can't run a ex4 in MT5

Why can't I ? If there are very good indicators in MT4 and not in MT5, then why there isn't any mechanism to use it?

To add comments, please log in or register