looks like you closed your for i loop before placing your imonarray
so u could do something like
Code:
int start()
{
double MA, RSI[];
ArrayResize(RSI,BandPeriod);
int counted_bars=IndicatorCounted();
int limit = Bars-counted_bars-1;
for(int i=limit; i>=0; i--)
{
RSIBuf[i] = iRSI(NULL,0,RSIPeriod,MODE_CLOSE,i);
MA = 0;
for(int j=i; j<i+BandPeriod; j++) {
RSI[j-i] = RSIBuf[j];
MA += RSIBuf[j]/BandPeriod;
}
{
RSIBufdot[i] = iRSI(NULL,0,RSIPeriod,MODE_CLOSE,i);
}
UpZone[i] = MA + (1.3185 * StDev(RSI,BandPeriod));
DnZone[i] = MA - (1.3185 * StDev(RSI,BandPeriod));
UpZonei[i] = MA + (0.68 * StDev(RSI,BandPeriod));
DnZonei[i] = MA - (0.68 * StDev(RSI,BandPeriod));
}
for(i=limit; i>=0; i--)
{
SignalMABuf[i]=iMAOnArray(RSIBuf,0,SignalMAPeriod,0,MODE_EMA,i);
}