0

I have an mt4 indicator that shows values in the data window that I want to access. I only have the ex4 file and not the source code file mq4, Is it possible for me to access those data values using the mql4 iCustom function, and use them in a different indicator?

I used the iCustom funtion in a seperate indicator trying to get the data from the data window for a indicator called waves-indicator. I have no idea on how to set up the parameters of this function. The parameters I used did not make any errors when compiled, but I was not able to aquire the correct values. The mql4 manual's explaination is worthless for me. Help please.

Robert H.
  • 3
  • 3
  • Also, ICustom function will not accept the indicator name with its hyphen... waves-indicator. Plus it keeps giving me the empty value, 2147483647 every time. Here is the function... CusIBuffer[i]= (iCustom(NULL,0,waves-indicator,2,i)); – Robert H. Nov 05 '22 at 23:36
  • So no one can help me with the iCustom function mql4. Hmmm! – Robert H. Nov 09 '22 at 20:44
  • It should be possible for you to access the indicators values using iCustom as long as it uses standard buffers, however it is difficult to assist without access to the indicator. Please post a link to the indicator if you want further assistance. – PaulB Nov 14 '22 at 12:58

2 Answers2

0

enter image description here

 double value0=NormalizeDouble(iCustom(Symbol(),PERIOD_CURRENT,"indicatorName.ex4",0,1),Digits);
 double value1=NormalizeDouble(iCustom(Symbol(),PERIOD_CURRENT,"indicatorName.ex4",1,1),Digits);
 double value2=NormalizeDouble(iCustom(Symbol(),PERIOD_CURRENT,"indicatorName.ex4",2,1),Digits);
Yasin İPEK
  • 54
  • 10
0

This sample is using iCustom for Heiken Ashi and Half Trend Indicator

double HA = NormalizeDouble(iCustom(Symbol(),PERIOD_CURRENT,"Heiken Ashi",PERIOD_CURRENT,0,1),4);

or

double ha_open = iCustom(NULL, 0, "Heiken_Ashi", 0, 0);
double ha_close = iCustom(NULL, 0, "Heiken_Ashi", 0, 1);
double prev_ha_open = iCustom(NULL, 0, "Heiken_Ashi", 0, 2);
double prev_ha_close = iCustom(NULL, 0, "Heiken_Ashi", 0, 3);

other sample

double B1 = NormalizeDouble(iCustom(Symbol(),PERIOD_CURRENT,"Half Trend",0,0),4);
double B2 = NormalizeDouble(iCustom(Symbol(),PERIOD_CURRENT,"Half Trend",0,1),4);

you can find the information about how many indicator buffer that available, just check it in indicator.mq4 file like half trend.mq4:

IndicatorShortName("Half Trend");
IndicatorDigits(Digits);
IndicatorBuffers(7); // +1 buffer - trend[]