Cannot see an offline chart - page 5

 
qjol:

the command 33324 is to update data not a tick


Hi Raptor,

I agree with qjol that it seems not what I'm looking for. The 33324 commands seems just ask the offline chart window to update/refresh data, not but triggering a tick to the offline chart's (i.e. trigger the OnStart of a EA). Also, PeriodConvert is a script, not a EA.

To workaround it, I am adding a infinite loop inside OnTimer(), so that the main logic will keep running forever (with a little sleep). Basically, changing it to a script.

But I am still hoping this will be solved in the new MT4.

 
lingwuchung:


Hi Raptor,

I agree with qjol that it seems not what I'm looking for. The 33324 commands seems just ask the offline chart window to update/refresh data, not but triggering a tick to the offline chart's (i.e. trigger the OnStart of a EA). Also, PeriodConvert is a script, not a EA.

To workaround it, I am adding a infinite loop inside OnTimer(), so that the main logic will keep running forever (with a little sleep). Basically, changing it to a script.

But I am still hoping this will be solved in the new MT4.

On no! Tester cannot work if I workaround like this! It will stay at the first bar forever!

 
lingwuchung:


Hi Raptor,

I agree with qjol that it seems not what I'm looking for. The 33324 commands seems just ask the offline chart window to update/refresh data, not but triggering a tick to the offline chart's (i.e. trigger the OnStart of a EA). Also, PeriodConvert is a script, not a EA.

To workaround it, I am adding a infinite loop inside OnTimer(), so that the main logic will keep running forever (with a little sleep). Basically, changing it to a script.

But I am still hoping this will be solved in the new MT4.

OK, I see the distinction, what did you do before to get start() to run ?
 
RaptorUK:
OK, I see the distinction, what did you do before to get start() to run ?


Fixed it! Thanks to qjol. He already gave the answer and I only notice that now!

The solution is simple. Just replace like this in the script generating the offline chart:

RegisterWindowMessageA("MetaTrader4_Internal_Message") with RegisterWindowMessageW("MetaTrader4_Internal_Message")

PostMessageA(hwnd, MT4InternalMsg, 2, 1) with PostMessageW(hwnd, MT4InternalMsg, 2, 1)

 
qjol:

the command 33324 is to update data not a tick


qjol! Thanks Thanks! Actually I have seen people in other forums haven't got this resolved yet as of today. This forum is the first (at least those who ask for help)! Rocks! This bring me the good feeling that I am still a capable programmer!!! :)

 
i did it for myself glad to share
 
RaptorUK:
Maybe you should read about the differences between the old mql4 and the new mql4 . . .


Maybe you should support legacy code so that productive traders don't have to waste time with coding hobbyists.

YL

 

Stop discussion.

33324 is not a command for incoming tick. It is refresh chart command.

About other commands just google it. We treat using such commands as a hack, but we not changed commands about 6 or 7 years and will not change they in the future. (top secret)

There was a bug with exotic symbol name on the offline charts (such as ERRUDD, just a joke)/ Fixed in the build 605


Now about "degrade"

You can set timer in miiliseconds not only in seconds. Just try it

Try also EventChartCustom. You will enjoy

 
yellowlion:


Maybe you should support legacy code so that productive traders don't have to waste time with coding hobbyists.

How would you like me to do that ?
 
stringo:

Stop discussion.

33324 is not a command for incoming tick. It is refresh chart command.

About other commands just google it. We treat using such commands as a hack, but we not changed commands about 6 or 7 years and will not change they in the future. (top secret)

There was a bug with exotic symbol name on the offline charts (such as ERRUDD, just a joke)/ Fixed in the build 605


Now about "degrade"

You can set timer in miiliseconds not only in seconds. Just try it

Try also EventChartCustom. You will enjoy



Thank you for published workarounds, just a note.

Both of them suppose that indicators and experts attached to the offline chart use other method than OnCalculate, OnTick or start(). That means they are not a solution for ready-made ex4 indicators and experts.