How to auto get 15min and 30min data

 
I have write a EA,This is EA must be use 15min and 30min BOOL and KDJ indicator data, excuse me ,How can I get the data all the time ,ensure me EA can read the correct  data.How can to do.thank you very much.
 
On MT5: Unless the chart is that specific pair/TF, you must Synchronize the terminal Data from the Server.
          Timeseries and Indicators Access /  Data Access - Reference on algorithmic/automated trading language for MetaTrader 5