Adding Market Functions






Any MQL function in VTS can be used as a market function.  The function must have a single string parameter and return a double value.


To have the function appear in Function section of the  fnGetBestMarket function, the function name is added to the marketfunction.lst file.


The marketfunction.lst file is a text file that lists all of the available market functions. It can be edited with any text editor, including NotePad.


The marketfunction.lst file is located at:

C:\Program Files (x86)\iExpertAdvisor\Visual Trader Studio Connect\cfg\list




The original contents of the marketfunction.lst file:

"fnGetVolatility"

"fnGetVolume"

"fnGetTrendUp"

"fnGetTrendDown"

"fnGetBreakOut"


To add a new function, enter the name of the function, in quotes, on a new line and save the file. For example:

       "MyNewMqlFunction"