Can some kind soul please explain why the iMaOnArray works when first loaded but fails when the timeframe is changed.
Obviously I am missing something?
When the indi is first loaded the Ma's show as expected but once the TF is changed they are there somewhere but the values are '0' or very low.
Any help much appreciated.
TIA
M.
Obviously I am missing something?
Inserted Code
int start() { double mPrsCl; int mLim, counted_bars = IndicatorCounted(); ArraySetAsSeries(mMa, true); ArraySetAsSeries(mMa2, true); if(counted_bars > 0) mLim = MathMin(Bars, mHist) - (counted_bars - (Bars - mHist)); if(counted_bars < 0) return(0); if(counted_bars == 0) mLim = MathMin(Bars, mHist) - 1; for(int i = mLim; i >= 0; i--) { ....... some code mPrsCl = someval; BarCl[i] = mPrsCl; if(i < mHist - mMaPrd2 - 1) { mMa[i] = iMAOnArray(BarCl, 0, mMaPrd, 0, 1, i); mMa2[i] = iMAOnArray(BarCl, 0, mMaPrd2, 0, 1, i); } } ......... more code return(0); }
When the indi is first loaded the Ma's show as expected but once the TF is changed they are there somewhere but the values are '0' or very low.
Any help much appreciated.
TIA
M.
If you think I'm mad, I must be mad