Download MetaTrader 5
To add comments, please log in or register
Find out how to install MetaTrader on Mac OS
Carl Schreiber
5954
Carl Schreiber 2014.02.17 18:33 

Hi,

has anybody found how to get the info of

a) market closed - in 509 you can get the error-msg

ERR_MARKET_CLOSED 132 Market is closed.

if you send an order and the market is closed - I would prefer a value from MarketInfo() or TerminalInfoInteger() as a closed market is .th. different than TERMINAL_TRADE_ALLOWED.


b) portable-mode I think it would help a lot if you have to use WinFile.mqh to know whether the terminal was started in /portable-mode or not. TerminalInfoInteger(..) has not such a property_id.

Any idea?


Thanks in advance

Gooly



Ubzen
Moderator
5394
Ubzen 2014.02.17 19:04  
gooly:

has anybody found how to get the info of

a) market closed - in 509 you can get the error-msg

ERR_MARKET_CLOSED 132 Market is closed.

if you send an order and the market is closed - I would prefer a value from MarketInfo() or TerminalInfoInteger() as a closed market is .th. different than TERMINAL_TRADE_ALLOWED.


b) portable-mode I think it would help a lot if you have to use WinFile.mqh to know whether the terminal was started in /portable-mode or not. TerminalInfoInteger(..) has not such a property_id.

Any idea?

Yes. a) && b) would be nice. If you can ... please contact the service desk with your suggestions.
Alain Verleyen
Moderator
28627
Alain Verleyen 2014.02.17 19:41  
gooly:

...


b) portable-mode I think it would help a lot if you have to use WinFile.mqh to know whether the terminal was started in /portable-mode or not. TerminalInfoInteger(..) has not such a property_id.

Any idea?


Thanks in advance

Gooly

Why ? What to do ?
Carl Schreiber
5954
Carl Schreiber 2014.02.17 20:18  
ubzen:
Yes. a) && b) would be nice. If you can ... please contact the service desk with your suggestions.


a) I'd like to have another easier and faster way than sending a fake order and catching the error or delete it! Do you know an alternative?

"Why ? What to do ?"

b) mt4 has with its file-functions limited access to the 'environment' and I think mt4 should confess where it is playing in an easier way than by a string examination of the TERMINAL_DATA_PATH

gooly

PS: I send a request to the service desk, but I doubt that ....

Ovo Cz
2951
Ovo Cz 2014.02.17 20:30  
gooly:

a) I'd like to have another easier and faster way than sending a fake order and catching the error or delete it! Do you know an alternative?

"Why ? What to do ?"

b) mt4 has with its file-functions limited access to the 'environment' and I think mt4 should confess where it is playing in an easier way than by a string examination of the TERMINAL_DATA_PATH

gooly

PS: I send a request to the service desk, but I doubt that ....


I doubt, too. In normal operation, you can hardly ever get the "market closed" error, just because there are no ticks to trigger the order.

And TERMINAL_DATA_PATH seems very handy to test the portable mode in one line comparison, so I am not really sure, if they could make it easier for you.

Alain Verleyen
Moderator
28627
Alain Verleyen 2014.02.17 20:56  
gooly:

a) I'd like to have another easier and faster way than sending a fake order and catching the error or delete it! Do you know an alternative?

See SymbolInfoSessionTrade(). I have not tested with new MT4 though.


"Why ? What to do ?"

b) mt4 has with its file-functions limited access to the 'environment' and I think mt4 should confess where it is playing in an easier way than by a string examination of the TERMINAL_DATA_PATH

I still don't see the usage you can do if you know if "/portable" was used. Lack of imagination maybe.
Carl Schreiber
5954
Carl Schreiber 2014.02.17 22:36  
angevoyageur:

a) See SymbolInfoSessionTrade(). I have not tested with new MT4 though


b) I still don't see the usage you can do if you know if "/portable" was used. Lack of imagination maybe.

a) this looks good - I'll check tomorrow and next weekend.

(There are some new functions that are new and I'd like to have a list of them, a list of what is new and what has changed - that would make life so much easier ;)

b) I have installed mt4 4 times (one for each kernel of my cpu) and some files - centrally saved - must be copied by the EA upon test begin in the correct mt4-folders.

Therefore I'd like to have cheap way (code lines, readability,..) to do that.

Gooly
Alain Verleyen
Moderator
28627
Alain Verleyen 2014.02.17 23:39  
gooly:

a) this looks good - I'll check tomorrow and next weekend.

(There are some new functions that are new and I'd like to have a list of them, a list of what is new and what has changed - that would make life so much easier ;)

b) I have installed mt4 4 times (one for each kernel of my cpu) and some files - centrally saved - must be copied by the EA upon test begin in the correct mt4-folders.

Therefore I'd like to have cheap way (code lines, readability,..) to do that.

Gooly

TERMINAL_COMMONDATA_PATH ?

/
To add comments, please log in or register