If yes, How can i get hold of that unopened-chart's id?
I want to apply ChartRedraw() on that chart. SO i need it's id.
P.S: pure MQL solutions proffered, but if you suggest DLLs, please explain how to efficiently use them. Things mustn't slow down.
How exactly do you imagine redrawing something that is not drawn in the first place?
Unless by "unopened" you mean charts opened but not visible (at the moment being behind the visible one), then there are plenty of functions, most of them starting with Chart.
What if the chart resides in "File>Open Offline"? But not yet opened
Not sure if i could explain 100% what i'm looking for.
Suppose the following scenario :
I generated a 3H offlinechart using the period_converter script.
How can i keep getting this chart's High,Low,Open,Close?
If you don't open the chart, it's time-series don't update! No matter how much you write data to .hst file.
My observations telling that the offlinechart needs to be kept open, otherwise it doesn't update anything!
That is true. If you need to access the candlestick data, you have to read the file rather than using the MQL commands.
ChartRedraw() does nothing with the quotes, it redraws graphics only.
Did you mean reading the .hst file? iOpen/iClose etc. don't work realtime, unless the offline chart is kept open.
Do you know any other way around?
These are not charts, just history files. You can import those as a file into your expert running on another chart (the hard and complicated way) or - the natural MT4 way - open an offline chart with them and put your expert on the new chart.
Or, of course, you can just use MT5 - H3 is one of the built-in timeframes.
Yes, I meant the hst file. You have only two options afaik - either keep the offline chart open or read the hst file quotes ad hoc.
In other words,
1. only rewriting/updating the hst file is not enough to update the time-series (iClose,iOpen etc.) of the offline chart, real-time.
2. hst file is not chart but only just a file (though it shows in Offline-charts tab)
Correct me if I got it wrong.
Is there anyway to force update offline chart's time-series, after rewriting/updating the hst file?
Or its just the way Metatrader was made to work?
Well, close but not exactly. MQL used to ignore the hst files of offline charts a few years ago, returning zero for every quote. Then MQ made sort of attempt to access the closed offline chart quotes from MQL. The result is, you can access quotes from hst file, but they do not update after your first access. So it is as useless as before.
Can you give some code-examples of the attempts made by MQ? I started coding MQL after 2017, so not familiar with its evolution.
In the documentation, I see no suitable methods to pull quotes out of hst file (other than directly reading it)