Daily MA from hourly bars

I am trying to calculate the daily MA from hourly bars.

I've read this:
http://www.amibroker.com/guide/h_timeframe.html

And I am doing this:

TimeFrameSet( inDaily ); // switch to daily time frame 
SlowMA = MA(Close, SlowMA_lookback); 
TimeFrameRestore(); // restore time frame to original
Plot( TimeFrameExpand( SlowMA, inDaily), "SlowMA Daily in hourly bars", colorYellow, SlowStyle );

But I want the line to stay still for the duration of the upcoming day, with the previous day's values. Sort of like a stair-step from one day to the next. Not continue to move intraday, where it is a smooth MA line. How do I make it hold the previous day's daily MA, for the duration of the current day, only changing that daily MA value once per day?

@vjsworld it works for me (assuming you have something proper for your "SlowStyle"). Are you not getting the type of image shown below (you wanted a "stair-step")?

SlowMA_lb = Param( "SlowMA_lb", 10, 5, 100, 1 );

TimeFrameSet( inDaily ); // switch to daily time frame
SlowMA = MA( Close, SlowMA_lb );
TimeFrameRestore(); // restore time frame to original

Color = Param( "Bar Color", colorBlue );
PlotOHLC( Open, High, Low, Close, "", color, styleBar | ParamStyle( "Style" ) | GetPriceStyle() , Null, Null, 0, 0, 3 );
Plot( TimeFrameExpand( SlowMA, inDaily ), "Daily MA(" + SlowMA_lb + ")", colorYellow, styleLine | styleStaircase );

image

Yep, stair steps!

Thanks Larry!