Indicator refresh problem

 

Hello,

I'm trying to call the "Cycle Period Indicator" ( https://www.mql5.com/en/articles/288 ) from an expert by the below code. It doesn't give the the right value but gives "EMPTY VALUE" after 2 bars.  I realized that the major issue is refreshing of the indicator when I try to test the indicator in visual mode. The indicator does not plot the new datas, but when I reload it, it plots all the data till last bar. It was the version coded for mt5 however the indicator complies for mt4 as well. And I have the mt4 version of, it agains does not refresh the new data in visual mode.

Can somebody help me to overcome this issue? I guess refreshing would solve the iCustom() issue.

Thanks in advance.


  double per=iCustom(_Symbol,0,"CyclePeriod",0.07,0,1);

  Alert("Period is = ",per);

 
 
Your link https://www.mql5.com/en/articles/288 points to a MT5 indicator. That won't compile on MT4. You have no such indicator, so of course your iCustom fails.
Reason: