dlls allowed

 

Sorry, im trying to explain myself using google translate.

Im trying to use MQL_DLLS ALLOWED and DLLS_ALLOWED to get the boolean if the dlls is allowed in the account or in my expert advisor, but i always get "allowed" and "true" even if i don't chech the dlls boxat the begining of my expert. i don't know if is a bug or im doing something wrong. This is my code:


int OnInit()

  {

....

if (TERMINAL_DLLS_ALLOWED){

    dlls_allowed ="DLLS allowed";

  }else {

    dlls_allowed ="DLLS not allowed, check the ALLOW DLLS checkbox at the beggining of the program";

  }

  bool MqlTradeAllowed = MQL_TRADE_ALLOWED;

...

 Print("MqlTradeAllowed: " + MqlTradeAllowed);

 Print("dlls_allowed: "+dlls_allowed);

...

Please letme know if you dont understand my problem... 


thanks.

 
lehi.salazar:

Sorry, im trying to explain myself using google translate.

Im trying to use MQL_DLLS ALLOWED and DLLS_ALLOWED to get the boolean if the dlls is allowed in the account or in my expert advisor, but i always get "allowed" and "true" even if i don't chech the dlls boxat the begining of my expert. i don't know if is a bug or im doing something wrong. This is my code:


Please letme know if you dont understand my problem... 


thanks.

https://www.mql5.com/en/docs/constants/environment_state/terminalstatus#enum_terminal_info_integer


see example code there.
you're using it wrong.
 
Soewono Effendi:
https://www.mql5.com/en/docs/constants/environment_state/terminalstatus#enum_terminal_info_integer


see example code there.
you're using it wrong.

Thanks @Soewono Effendi

I check the link examples and notice my error, i was missing declaring TerminalInfoInteger. I still making some probes because triying ACCOUNT_NAME, ACCOUNT_SERVER and ACCOUNT_COMPANY i get 0 if i use TerminalInfoString, and 1,3,2 if i use without TerminalInfoString. I still wondering  why i get integers instead strings.


i really apreciated your help.

 
lehi.salazar:

Thanks @Soewono Effendi

I check the link examples and notice my error, i was missing declaring TerminalInfoInteger. I still making some probes because triying ACCOUNT_NAME, ACCOUNT_SERVER and ACCOUNT_COMPANY i get 0 if i use TerminalInfoString, and 1,3,2 if i use without TerminalInfoString. I still wondering  why i get integers instead strings.


i really apreciated your help.

https://www.mql5.com/en/docs/account

You should invest sometime in reading documentation.
Programming is not guessing and hoping.
Good luck.