Ok, I changed it to:
int F = fileOpenEx("EURUSD1440.hst", FILE_BIN | FILE_READ | FILE_WRITE);
But I still have exact the same problems as described above!
have you read how the new structure of the history files is and what changes has been made ?
https://www.mql5.com/en/articles/1387
and what abuot 128 | 256 ?
Thanks for helping.
I know that article and I also tried it with 128 | 256 but nothing changes.
After reading the article again (and the PeriodConverter scripts) I found a little script that should only change a single bar in the history:
MqlRates rate; int ExtHandle=-1; rate.time = "2013.12.26 00:00"; rate.open = 1.34348; rate.high = 1.34353; rate.low = 1.34123; rate.close = 1.34137; rate.tick_volume = 1000; rate.spread = 0; rate.real_volume = 0; ExtHandle=FileOpenHistory("EURUSD1440.hst",FILE_BIN|FILE_WRITE|FILE_SHARE_WRITE|FILE_SHARE_READ|FILE_ANSI); FileWriteStruct(ExtHandle,rate); FileFlush(ExtHandle); FileClose(ExtHandle);
Obviously there is something missing/wrong in that script since the bar doesn't change.
I've read the article, tried out to produce a script which does the task. Unfortunately I still was not successful and that's why I'm asking for help in this forum.
BTW: The articles says that older scripts should still work with the new build but my script I posted first doesn't.
You are right, the article doesn't know anything about my script which is based on their period_converter scripts which supposed to run so should by script (but it doesn't). The article you posted is talking about the period converter, offline charts and mentions the history file. Of course there is no explicit hint how to modify a single bar in the history on a live/online chart programmatically (I didn't expected it). Anyway, I've read the article (I mentioned this already before) and tried to implement some code (see my previous posts) which unfortunately does not solve the problem. I'm aware that I'm not a high-level professional programmer. For that reason I am asking this forum for help (again).
I appreciate sending the link (even three times) to that one single article (period_converter, offline charts) and opening this thread but that was not helpful so far.
It would be an additional value to this forum if we could have a look at the scripts, have some constructive discussions and try to find a good solution from which others can benefit as well.
Thank you.
Of course there is no explicit hint how to modify a single bar in the history on a live/online chart programmatically (I didn't expected it).
if you would read the code, you'll understand exactly how to do it
I appreciate sending the link (even three times) to that one single article (period_converter, offline charts)
you are wrong, there is a difference between the two indicators of the links attached they are not the same
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
I want to update the last bars (e.g. last 200) bars on my chart of a symbol.
To do that I am trying to do updates on historical data files of the appropriate symbol.
I found a script here and adjusted it which now looks like this:
If calling this method I see that the appropriate history file has been changed (current "Date modified") but I don't see any changes on the chart :-(.
I also tried ChartRedraw() and WindowRedraw() but nothing happens.
What else is missing to be able to change the last historical bars (e.g. 200 bars)?
Thanks for helping.