How to change the timeframe of a chart with script ?

[Deleted]
Hi,

How to change the timeframe of a chart with script ?

Thanks,

Tintin92