Что собственно хочу сделать - индикатор силы Елдера.
Взял стандартный индикатор МТ4 ForceIndex и заменил Volume[i] на iCustom(NULL, 0, "ClusterDelta_PremiumVolume_3.9", 0, i).
Не работает, ошибку указанную в первом посте дает не всегда, но вот что выводит:
http://prntscr.com/hnr1r3
Помоги разобраться, плиз!
//+------------------------------------------------------------------+
//| Force Index indicator |
//+------------------------------------------------------------------+
int start()
{
int nLimit;
int nCountedBars=IndicatorCounted();
//---- insufficient data
if(Bars<=ExtForcePeriod) return(0);
//---- last counted bar will be recounted
if(nCountedBars>ExtForcePeriod) nCountedBars--;
nLimit=Bars-nCountedBars;
//---- Force Index counted
for(int i=0; i<nLimit; i++)
ExtForceBuffer[i]=iCustom(NULL, 0, "ClusterDelta_PremiumVolume_3.9", 0, i)*
(iMA(NULL,0,ExtForcePeriod,0,ExtForceMAMethod,ExtF orceAppliedPrice,i)-
iMA(NULL,0,ExtForcePeriod,0,ExtForceMAMethod,ExtFo rceAppliedPrice,i+1));
//---- done
return(0);
}