OFFLINE chart does not show. it only gives "waiting for update"

 

            
 
I have taken some parts out from the code, so dont worry about the perhaps missing semicolons..,little mistakes..thanks
 
strive23:

Hi, so I get the hst files, put them into the history folders, see them in the Offline Charts in mt4, when i load them i do not see anything...

It shows the number of bars created, however it shows the date from and date to in reverse.

Also i am trying to make it update from new data being written on the csv file, but I am not sure how. I looked at period_converter already but I am not sure what to pick from it to make it work. thanks for the help

rob

hst files are binary NOT csv files . . . to write them you use FileOpenHistory() look at period_converter for example code.
 
RaptorUK:
hst files are binary NOT csv files . . . to write them you use FileOpenHistory() look at period_converter for example code.


HI RaptorUK!

No what I am trying to do is that I have a series of CSV files, that I want to loop through copy and format into hst files. this is why i wrote csv | read and hst | write

you see what I mean?

fileOpenHistory() is for updating?

thank you!

 
  1. string filesarray[25]={"xxx.csv","xxx1.csv"} ;
    This is bad because the remaining array elements will be uninitialized strings and things crash when you try to read them. Use the correct size or just allow the compiler to calculate it: filesarray[] = {...}
  2. Look at actual off-line generators (renko, crb, equivolume) They send a post message to the offline chart when the history is updated.
  3. You're not checking for updates, you are continuously recreating the history files from the csvs, so doing #2 will result in 100% cpu.
 
WHRoeder:
  1. This is bad because the remaining array elements will be uninitialized strings and things crash when you try to read them. Use the correct size or just allow the compiler to calculate it: filesarray[] = {...}
  2. Look at actual off-line generators (renko, crb, equivolume) They send a post message to the offline chart when the history is updated.
  3. You're not checking for updates, you are continuously recreating the history files from the csvs, so doing #2 will result in 100% cpu.


Hi WHRoeder,

1. yes I actually have 25 CSV files in there, i just cut the names out for posting here.

2.Will do so

3.Will check for updates, the only thing is it's not ticks here, it's simply a csv file with some update from the outside.

4.any idea why i get the dates from and to reverse in offline charts?

thank you!

 
strive23:

HI RaptorUK!

No what I am trying to do is that I have a series of CSV files, that I want to loop through copy and format into hst files. this is why i wrote csv | read and hst | write

you see what I mean?

fileOpenHistory() is for updating?

thank you!

Ah, sorry, need to look more carefully you still should look at FileOpenHistory() for writing your hst files . . . it will write directly to the correct directory.
 
RaptorUK:
Ah, sorry, need to look more carefully you still should look at FileOpenHistory() for writing your hst files . . . it will write directly to the correct directory.


no pb. thank you will look into it!
 

anyone else could try and help me?

thanks

 
strive23:

anyone else could try and help me?

thanks

Are you writing the header correctly ? have you checked the contents of the hst file using a binary file reader ?
 
RaptorUK:
Are you writing the header correctly ? have you checked the contents of the hst file using a binary file reader ?

Hello RaptorUK

Im experiencing the same problem as strive23. I have a commercial rangebar generator and I can display the offline charts it generates. However, because its commercial the source code is not available.

When I open the offline charts that I generate, it shows "Waiting for Update".

I have checked both my charts and the commercial ones in a hst file reader I wrote (based on period_converter script), and both files print out ok. There is something that the commercial script does, and the period converter script, that I am not doing.

By the way, I cannot see the code posted by the OP - has it been deleted?


Thank you.

Reason: