Cannot see an offline chart

 

I am running a EA to generate offline chart, EURUSD2.hst. However I can only see it on the OS (with modified time running) but cannot see it in "Open Offline Chart". How come?

Note: I've just changed to a new broker and setup this MT4 new. There is no such problem in my old MT4. Both of them are of version 600.


Many thanks!

 
lingwuchung: I am running a EA to generate offline chart, EURUSD2.hst. However I can only see it on the OS (with modified time running) but cannot see it in "Open Offline Chart". How come? Note: I've just changed to a new broker and setup this MT4 new. There is no such problem in my old MT4. Both of them are of version 600.

I cannot see your attached codes?
 
Here is the EA, which I've used for more than a year. Thanks!
 
                HstHandle = FileOpenHistory(SymbolName + RenkoTimeFrame + ".hst", FILE_BIN|FILE_WRITE);

FILE_BIN|FILE_WRITE|FILE_SHARE_READ|FILE_SHARE_WRITE

Did you read our article?

 
stringo:

FILE_BIN|FILE_WRITE|FILE_SHARE_READ|FILE_SHARE_WRITE

Did you read our article?

Can you get the Documentation for FileOpenHistory() updated please . . .

mode

[in] File open mode. Can be one or combination of values: FILE_BIN, FILE_CSV, FILE_READ, FILE_WRITE.

. . there is no mention of the other flags.

 
stringo:

FILE_BIN|FILE_WRITE|FILE_SHARE_READ|FILE_SHARE_WRITE

Did you read our article?


Thanks Stringo! You're right I haven't read the article yet but the fact that one MT4 works and one doesn't with the same code make me thinkgs it's not due to coding issue. (oh, probably I was vague when I said "old MT4", which just meant a v600 which was installed a few days ago). After reading the article, I note the keyword "compile". After I compile the mq4 in my "old MT4", it got the same problem too! So it's fixed now. Thank you again!!!!

Then next problem is that I notice the offline chart is obviously lagging behind the online chart. I do the test with the PeriodConverter out of the box and notice the same. In the attached screen, you can see that all three pairs of currency are having different price in online and offline chart. This is not something that I can easily capture before I upgrade MT4. It doesn't help even if I reduce to one pair of online/offline chart only.

I've observed for a while and notice that it seems the offline chart will only got updated every 1 second, no matter how much ticks are there in the online chart within that second. Is this configurable? Another thing that I've missed?

 
lingwuchung:


Thanks Stringo! You're right I haven't read the article yet but the fact that one MT4 works and one doesn't with the same code make me thinkgs it's not due to coding issue. (oh, probably I was vague when I said "old MT4", which just meant a v600 which was installed a few days ago). After reading the article, I note the keyword "compile". After I compile the mq4 in my "old MT4", it got the same problem too! So it's fixed now. Thank you again!!!!

Then next problem is that I notice the offline chart is obviously lagging behind the online chart. I do the test with the PeriodConverter out of the box and notice the same. In the attached screen, you can see that all three pairs of currency are having different price in online and offline chart. This is not something that I can easily capture before I upgrade MT4. It doesn't help even if I reduce to one pair of online/offline chart only.

I've observed for a while and notice that it seems the offline chart will only got updated every 1 second, no matter how much ticks are there in the online chart within that second. Is this configurable? Another thing that I've missed?

Did you see this in the new period converter code ?

//--- refresh window not frequently than 1 time in 2 seconds
 
RaptorUK:

Did you see this in the new period converter code ?


Now I see it. :)

But there is no such checking in the Renko EA that I've been using but it's having similar symptom (that's why I try PeriodConverter) ........ Let me debug .......

But I've already encounter an even bigger problem - my mql4 cannot be compiled in v600 with syntax error!!! Just try to compile them in v503 which I've been using and it works and so it is sure there is compatibility issue in the compiler.... another headache.

 
lingwuchung:


Now I see it. :)

But there is no such checking in the Renko EA that I've been using but it's having similar symptom (that's why I try PeriodConverter) ........ Let me debug .......

But I've already encounter an even bigger problem - my mql4 cannot be compiled in v600 with syntax error!!! Just try to compile them in v503 which I've been using and it works and so it is sure there is compatibility issue in the compiler.... another headache.

Maybe you should read about the differences between the old mql4 and the new mql4 . . .
 
RaptorUK:
Maybe you should read about the differences between the old mql4 and the new mql4 . . .


Oh right. Reading.

 
RaptorUK:
Maybe you should read about the differences between the old mql4 and the new mql4 . . .


Hi,

I've resolved all the compilation errors but find the EA's OnTick (simplified to testOffline.mq4 as attached) cannot be triggered on offline chart (generating by PeriodConvertor). It doesn't have problem with normal M1 chart though. So I wonder what's wrong?

Files:
Reason: