Use this,and set number of bars from parameters.
Code:
TimeFrameSet( inDaily ); // switch now to daily
P1= Param("Daily P", 8, 3, 100,1);
mah_13D = MA( C, P1 ); // moving average from daily data
Plot( TimeFrameExpand( mah_13D, inDaily), " EMA Daily",ParamColor( "Daily EMA", colorCycle ), ParamStyle("Daily style",styleLine | styleThick| styleNoRescale));
TimeFrameRestore(); // restore time frame to original
below have posted the screenshot of both