Custom HST files iClose() getting newest data

 

I have a script which create hst files, i want to use this chart data from the hst files for some indicators but i see when i use iClose() function that the latest close price is only giving back correctly when i open a offline chart from the hst file and when i update this offline chart, then i see the iClose() function is also giving me back the updated price, but when i dont open the offline chart from a hst chart data file then the iClose() function is not giving the newest price. so it looks like a special metatarder behavior.

and i am looking for a solution for this problem, i can not open for every hst file a offline chart and update the offline chart because the metatarder have also limits and it is not a nice solution, if somebody know how to slove this problem other way, let me know, i can also pay you for a solution.

Reason: