Determining the Name of the History Folder

 
Hi there,

Some brokers that use Metatrader as their trading platform often have multiple folders within the history folder that contain different versions of history data depending on which of the brokers server one is connecting to.

Taking IBFX as an example, their history folder may contains folders like..

C:\Program Files\Interbank FX Trader 4\history\InterbankFX-MT4 Mini Accounts
C:\Program Files\Interbank FX Trader 4\history\InterbankFX-MT4 Standard Accounts
C:\Program Files\Interbank FX Trader 4\history\InterbankFX-Demo Accounts

Programatically is it possible code MQL to determine which history folder is currenly being used to the MT4 terminal to store its history data?

MQL has the string TerminalPath( ) function that returns the directory from which the client terminal was launched.

Is there some hidden or undocumented function like say HistoryPath( ) for example that returns the directory in which the client terminal is storing its history data?

If there isn't does anyone have a code sample they would like to share that can be used to determine the directory that the client terminal is using to store its history data?

Regards,

Laurence.
.
 
FileOpenHistory() takes care of opening files in the history folder.
What are you trying to do?
string historyPath = TerminalPath()+"\\history\\"+AccountServer();
 
FileOpenHistory() takes care of opening files in the history folder.
What are you trying to do?
string historyPath = TerminalPath()+"\\history\\"+AccountServer();


Completely overlooked the AccountServer() function. Thanks phy that does the trick.