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.
Alert("Period is = ",per);