Terminal Data Path

 

Hi, 

I know the find the terminal path which is kind of MetaQuotes\Terminal\FF5C0E29FAC93F5DD90858C939E9C0E8 however how I can automatically (programmatically) determine the location of the terminal_data_path.  Not from within Metatrader but from an installer? 

Thank you in advance.

 
Rabia Yoruk:

Hi, 

I know the find the terminal path which is kind of MetaQuotes\Terminal\FF5C0E29FAC93F5DD90858C939E9C0E8 however how I can automatically (programmatically) determine the location of the terminal_data_path.  Not from within Metatrader but from an installer? 

Thank you in advance.

You can use the portable mode: https://www.metatrader5.com/en/terminal/help/start_advanced/start.

Like: C:\Users\<user>\Documents\MT5\T1\ (and C:\Users\<user>\Documents\MT5\T2\  and  C:\Users\<user>\Documents\MT5\T3\ ...)

But as this unique folder name \FF5C0E29FAC93F5DD90858C939E9C0E8\ is required for products of the Market it cannot be used if you want to buy something from there.

Platform Start - For Advanced Users - MetaTrader 5 Help
Platform Start - For Advanced Users - MetaTrader 5 Help
  • www.metatrader5.com
After installation, a group of programs of the trading platform is added to the Start menu, and the program shortcut is created on the desktop. Use...
 
Carl Schreiber #:

You can use the portable mode: https://www.metatrader5.com/en/terminal/help/start_advanced/start.

Like: C:\Users\<user>\Documents\MT5\T1\ (and C:\Users\<user>\Documents\MT5\T2\  and  C:\Users\<user>\Documents\MT5\T3\ ...)

But as this unique folder name \FF5C0E29FAC93F5DD90858C939E9C0E8\ is required for products of the Market it cannot be used if you want to buy something from there.

Thank you for your reply however i must use the main mode and i should import some files inside of terminal data path. I don't know how can i determine the unique folder name outside of metatrader app.

 
Rabia Yoruk:

Hi, 

I know the find the terminal path which is kind of MetaQuotes\Terminal\FF5C0E29FAC93F5DD90858C939E9C0E8 however how I can automatically (programmatically) determine the location of the terminal_data_path.  Not from within Metatrader but from an installer? 

Thank you in advance.

You can find the algorithm in this code. Just convert it using your scripting language.

Instance ID script for MT4/MT5
Instance ID script for MT4/MT5
  • www.mql5.com
This script allows a user to find out instance_id of the running MetaTrader instance/installation.
Reason: