There are different ways, but this - ChartSetSymbolPeriod(0, NULL, PERIOD_H4); - added to custom code when you want the timeframe changed should do it. So when you have worked out the drawdown.
What do you want to do? Start with this, once per bar - Terminal Variables (internally add candle 1 close) then on live/demo, add to a 1 min chart, press f3 every minute and you will see the value change.