When base time interval is hourly, does it mean that MV_50 = EMA( Close, 50); alone without TimeFrameSet() and TimeFrameRestore() will return moving average of 50 hourly closing bars?
The code is incorrect (or only partially correct) because it misses TimeFrameExpand. It was explained in the guide http://www.amibroker.com/guide/h_timeframe.html (orange boxes contain most imporant stuff) as it says:
IMPORTANT: TimeFrameExpand IS REQUIRED for any formula that uses TimeFrame* functions. If you don't expand time compressed data you will have incorrect timestamps (see description below in "How it works").
and
Time-frame functions do not change the BarCount - they just squeeze the arrays so you have first N-bars filled with NULL values and then - last part of the array contains the actual time-compressed values. This is why it is essential to expand the data back to the original frame with TimeFrameExpand.
As advised in the manual and on the forum, to gain insight into how functions work you should use exploration:
// this code is intended to be run in HOURLY timeframe
HourlyMA = EMA( Close, 50 ); // this is HOURLY EMA
TimeFrameSet( inDaily );
SqueezedDailyEMA = EMA( Close, 50); // Daily EMA but squeezed !
TimeFrameRestore();
// should expand to use it !
ExpandedDailyEMA = TimeFrameExpand( SqueezedDailyEMA , inDaily );
Filter = 1;
AddColumn( HourlyMA , "HourlyEMA" );
AddColumn( SqueezedDailyEMA , "SqueezedDailyEMA " );
AddColumn( ExpandedDailyEMA , "ExpandedDailyEMA " );
If you now run this exploration, you will clearly see how all functions work. EMA alone produces EMA in hourly timeframe. EMA placed inside TimeFrameSet/Restore produces SQUEEZED array (daily bars are placed (squeezed) at the very end of the array and timestamps do NOT match with hourly data).
Only after TimeFrameExpand compressed daily data are aligned with hourly data and can be used together because all timestamps match.
IMPORTANT: TimeFrame functions are NOT intended to replace Periodicity setting.To switch periodicity/interval you should only use Periodicity setting. TimeFrame functions are ONLY for formulas that MIX many different intervals at once in single formula.
As can be seen from the above - actually entire explanation is in the manual. I just quoted relevant parts. I can't write it better. Only you can read it multiple times until it sinks and/or run exploration to see how it works in practice. There is no substitute for actually running exploration. It explains everything.