set time frame when attach script or EA or indicator

 

hi guys  itry to set the time frame  when  i attach a script

with this code  but not work

   ChartSetSymbolPeriod(0,NULL,PERIOD_M30);  

anyone can  help me ? thankz

 
It can't work. The chart will not change until the script exits. An EA will stay loaded during the de-init/init cycle.
 
and dont exist a mode  for change time frame on the fly when i attach a EA or script  , because  when i attach it set me  always H1
 
Please write correct English as much as possible. Uppercase and punctuation are not optional.
Reason: