I'm trying to convert an EA from MT4 to MT5.
The EA in MT4 is using a iCustom function in order to get the values from an indicator.
The Indicator has 8 buffers . In MT4 it's working fine (i.e. the iCustom function retrieve the value from the 8 buffers of the indicator correctly).
In MT5 , instead, It's retrieving strange values from the indicator..
The indicator is placed under MQL5\Indicators.
Here below my MQL5 code: (note 60 is the iput parameter of the indicator)
for (i=0; i<60;i++){
EUR[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,0,i);
USD[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,1,i);
GBP[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,2,i);
JPY[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,3,i);
CHF[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,4,i);
CAD[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,5,i);
AUD[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,6,i);
NZD[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,7,i);
}
Can somebody help me please ?
The EA in MT4 is using a iCustom function in order to get the values from an indicator.
The Indicator has 8 buffers . In MT4 it's working fine (i.e. the iCustom function retrieve the value from the 8 buffers of the indicator correctly).
In MT5 , instead, It's retrieving strange values from the indicator..
The indicator is placed under MQL5\Indicators.
Here below my MQL5 code: (note 60 is the iput parameter of the indicator)
for (i=0; i<60;i++){
EUR[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,0,i);
USD[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,1,i);
GBP[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,2,i);
JPY[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,3,i);
CHF[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,4,i);
CAD[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,5,i);
AUD[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,6,i);
NZD[i]=iCustom(NULL, PERIOD_M1, "LR Strength", 60,7,i);
}
Can somebody help me please ?