Is it possible?

 

Hi, everybody.

Is it possible to make up a indicator that can post on 30M Chart the MA curves based on 60M data?? (i.e. to post MA curve of higher time frame to lower time frame chart)

 

Yes!

steve_zhng:
Hi, everybody. Is it possible to make up a indicator that can post on 30M Chart the MA curves based on 60M data?? (i.e. to post MA curve of higher time frame to lower time frame chart)

steve_zhng,

Sure, you can.

int start()

{

int counted_bars=IndicatorCounted;

//---- check for possible errors

if (counted_bars<0) return(-1);

//---- last counted bar will be recounted

if (counted_bars>0) counted_bars--;

int pos=Bars-counted_bars;

//---- main calculation loop

while(pos>=0)

{

ExtMapBuffer1[pos]= iMA(NULL,60,13,0,MODE_EMA,PRICE_CLOSE,pos);

pos--;

}

return(0);

}

The second parameter in iMA function is the time frame you want to use. (here 60M).

 

Thanks a lot, Codersguru.

I really appreciate your reply and your wonderful course.