View Single Post
  #2 (permalink)  
Old 04-26-2006, 10:35 AM
elihayun's Avatar
elihayun elihayun is offline
Senior Member
 
Join Date: Jan 2006
Posts: 357
elihayun is on a distinguished road
the buffers u assign value to, missed the index

ExtMapBuffer1[idx]=iMA(NULL,0,9,8,MODE_EMA,PRICE_CLOSE,idx);
ExtMapBuffer2[idx]=iMA(NULL,0,30,8,MODE_EMA,PRICE_CLOSE,idx);

ExtMapBuffer3[idx]=iMomentum(NULL,0,12,PRICE_CLOSE,idx);


you have to have loop to accomplish this. something like



int limit=Bars-IndicatorCounted();

for (int idx = 0; idx < limit; idx++)
{
ExtMapBuffer1[idx]=iMA(NULL,0,9,8,MODE_EMA,PRICE_CLOSE,idx);
ExtMapBuffer2[idx]=iMA(NULL,0,30,8,MODE_EMA,PRICE_CLOSE,idx);

ExtMapBuffer3[idx]=iMomentum(NULL,0,12,PRICE_CLOSE,idx);
}



by using double ExtMapBuffer1 ... u are creating new variables and not using the original buffers
Reply With Quote