Hi all ,
I am trying to put hourly Ema in 15min Chart but I cant understand 
which one should be used.
I wrote 2 codes:
1.
EMAstyle=ParamStyle("MAType",styleLine,maskAll );
EMAperiod=Param("MA Period",13,10,500);
ChartStyl=ParamStyle("Chart Type", styleCandle,maskAll );
Chartcolor=ParamColor("Chart Colour",colorBlack); 


C_hrly=TimeFrameGetPrice("C",inHourly,0);
splema=EMA(C_hrly,EMAperiod);

Plot(splema,"Hourly EMA of "+EMAperiod+" Bar",colorBlue,EMAstyle);

2.

EMAstyle=ParamStyle("MAType",styleLine,maskAll );
EMAperiod=Param("MA Period",13,10,500);
ChartStyl=ParamStyle("Chart Type", styleCandle,maskAll );
Chartcolor=ParamColor("Chart Colour",colorBlack); 

TimeFrameSet(inHourly); 

     HourlyEMA=EMA(C,EMAperiod);

TimeFrameRestore();
Plot(TimeFrameExpand(HourlyEMA,inHourly),"Hourly EMA",colorPink);




The problem is that, two ema values are different.
Please tell me which one can be used as actual hourly ema?

I ploted a normal ema by using Drag drop from  average list in the 
amibroker.
after converting the chart into hourly mode , above two codes  show 
same value but they are diff  from the normal ema.
If any one of the above two codes results hourly ema then atleast 2 
ema should be same after converting the chart into hourly mode.
Please Help. I am very much puzzled.
regards
Debdulal Bhattacharyya

Reply via email to