If you have a Metastock database or if your data provider delivers data in Metastock format, then you can either:
- Use the "Download -> External Database" tool to allow QuantShare to read data directly from your Metastock database
- Or import data from your Metastock database into the QuantShare database
Although the first solution is easier to set up and maintain, the second one offer two big advantages:
1/ Ability to use certain features of QuantShare such as the automated update of watchlists on new data and the ability for the Alert tool to trigger events on new data. The reason is that since QuantShare will use an external database, it will no know about any changes in the data.
2/ Big speed improvement compared to reading data from the Metastock database. This is important particularly when you are optimizing a trading system and backtesting thousands of trading systems.
For the first solution, please follow instructions here: https://www.quantshare.com/how-444-how-to-use-quantshare-with-metastock-data
If you decide to go with the second solution, here is what you need to do:
- Select "Download" then "Download Manager"
- Click on "Add" at the top to create a new download item
- Click on "Add Url" at the top/right corner
- Under "Content Type", select "METASTOCK"
- Click on "Settings" button under "Settings" column
- Click on "Create a URL-Script" button
Here, we will implement the code that would allow the downloader to get all Metastock sub-directories databases and parse them automatically.
In the text editor, type the following script:
string path = @"C:\path_to_metastock_folder\";
string dir = System.IO.Directory.GetDirectories(path, "*.*", System.IO.SearchOption.AllDirectories);
for(int i=0;i < dir.Length;i++)
if(System.IO.Directory.GetFiles(dir[i], "EMASTER").Length > 0)
// Make sure you update the first line with the path to the Metastock main folder
// The script will automatically look for all sub directories and parse the ones that contain the "EMASTER" file
- Click on "OK" then "OK" again to close the "Download Settings" form.
- Click on the "Parser" button under "Parser" column
A list of all Metastock databases will be listed there. Select one then select a symbol to parse.
- Click on the "Add Column" as many times as need to create the following structure:
Quotes -> Symbol
Quotes -> Date
Quotes -> Open
Quotes -> High
Quotes -> Low
Quotes -> Close
Quotes -> Volume
Select semicolon as separator and MDY as "Date Type".
Make sure you also check "Automatically add new symbols" if you want to add unknown symbols to your QuantShare database.
Now, set the appropriate time-frame (Example: Daily or 1-min) then click on "Next". Make sure everything is correct then click on "Next" then "Finish".
Please note that a download item should be created to parse only one specific time frame.
If you have a daily database and a 1-min database, then you need to create a different download item for each one.