The Dtm indicator with the possibility to change the indicator timeframe from input parameters:
input ENUM_TIMEFRAMES TimeFrame=PERIOD_H4; // Indicator chart period (timeframe)
The indicator requires the compiled Dtm.ex5 indicator file. Add it to <terminal_data_folder>\MQL5\Indicators.
Fig.1. The Dtm_HTF indicator.