Get the currently active profile name

Back to topics list To post a new topic, please log in or register
avatar
40
Hoodlum 2016.02.02 20:25
 

I've been Googling for a while, but can't turn anything up.

Is there a way to retrieve the currently active profile name in code?

lastprofile.ini contains, unsurprisingly, the last profile name, not the current one.

Thanks

avatar
40
Hoodlum 2016.02.02 21:58 #
 

I'm just about to implement the approach outlined here of looping through the profiles folder, to find the one with the most recently modified chart file - but it's a bit heavy handed. Was wondering if anyone knew a simpler way.

https://forum.mql4.com/35555 

avatar
125
zirkoner 2016.02.03 17:12 #
 
#import "MT4API.ex4"
string GetCurrentProfileName();
#import
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   printf("Current profile name is : %s",GetCurrentProfileName());
  }

Attached files:
  mt4api.ex4  (5.72 KB)
avatar
1
nickbraco 2016.08.12 09:08 #
 

Do you have the code for the above GetCurrentProfileName() script?

Where does the mt4api.ex4 come from? or do you have the associated mq4?

Many Thanks 

Back to topics list  

To add comments, please log in or register