The XPeriodCandleSystem indicator with the timeframe selection option available in the input parameters:
input ENUM_TIMEFRAMES TimeFrame=PERIOD_H4; // Indicator chart period (timeframe)

Fig. 1. XPeriodCandleSystem_HTF indicator in a separate window

Fig. 2. XPeriodCandleSystem_HTF_ indicator in the main window