Download MetaTrader 5
To add comments, please log in or register
How to buy a product in MetaTrader AppStore? Read the article!
maindoor
120
maindoor 2014.11.23 20:29 

Chartopen() is not able to open offline charts. Is there a programmatic way to open offline charts ?

honest_knave
959
honest_knave 2014.11.23 22:00  
maindoor
120
maindoor 2014.11.24 09:55  

Thanks, but this doesn't work.

It opens the offline dialog box, but doesn't select the offline chart or open the chart. I think the function

OpenOfflineChartbyNum needs fixing but I don't know how. It has lots of windows programming elements.

Halley
198
Halley 2014.11.24 17:23  
maindoor:

Chartopen() is not able to open offline charts. Is there a programmatic way to open offline charts ?



maindoor
120
maindoor 2014.11.24 23:28  
DeepThought:

Sure, but the solution posted by honest_knave almost works, except for a few windows specific changes.

Like selecting an entry and clicking on it. So far I find sendmessage should be used instead of postmessage on win 7.

If there are any other changes in this code: https://forum.mql4.com/ru/25962/page3#382947 experts here can comment.

Halley
198
Halley 2014.11.25 09:01  
maindoor:

Sure, but the solution posted by honest_knave almost works, except for a few windows specific changes.

Like selecting an entry and clicking on it. So far I find sendmessage should be used instead of postmessage on win 7.

If there are any other changes in this code: https://forum.mql4.com/ru/25962/page3#382947 experts here can comment.


Well, it is not quite trivial. Just reading the file list n a folder is not enough. The chart list in the "Open offline" modal window skips files that are not valid hst files (it apparently analyses the content).

Additional issue may arise with sorting. You are not sure how sorting of the modal window corresponds to the sort you use for files. The users are from all over the word, with many different locales.

 For those reasons I would not use the down arrow press event. I would use keyboard sequence for the chart name. But... again, you have many keyboard layouts all over the world, so a bit advanced coding is necessary. 

maindoor
120
maindoor 2014.11.26 13:15  
DeepThought:

Well, it is not quite trivial. Just reading the file list n a folder is not enough. The chart list in the "Open offline" modal window skips files that are not valid hst files (it apparently analyses the content).

Additional issue may arise with sorting. You are not sure how sorting of the modal window corresponds to the sort you use for files. The users are from all over the word, with many different locales.

 For those reasons I would not use the down arrow press event. I would use keyboard sequence for the chart name. But... again, you have many keyboard layouts all over the world, so a bit advanced coding is necessary. 

 

:(
/
To add comments, please log in or register