Sunnybeach / Publications
Forum
A simple question regarding SMMA
I need to implement the original code for: PriceBasic = iMA(NULL,PERIOD_M30, BasePeriod,0,MODE_SMMA, PRICE_CLOSE, 1); I code as following: sumN1 = 0.0; for(ij = BasePeriod; ij >= 1; ij--) sumN1 = sumN1 + Close[ij]; SMMA1 = sumN1/BasePeriod; TDIBasic1 = (sumN1 - SMMA1 + Close[1])/BasePeriod; But I