Click here to Login





                                                   How to export to metastock ascii, 10 or 11 Format

  0

0
Hemmie
2010-10-31 02:11:44


Hello There,

I'm new to Quontshare, pretty much excited about its features.

Just want to have a way to export Quontshare databases (quotes and intraday) into MetaStock format or similar format that can be read /importedby other applications.
This way I do not want to download data again for other applications can use the data Quontshare.

I found a feature for export into CSV, but didn't get much information on how to export into Metastcok ascii format and/or Metastock 10/11 format.

I appreciate if someone can help me on this.

Thank you



QuantShare
2010-11-01 06:42:53

  0

QuantShare do not have a function to export data into Metastock format. (only to CSV).
You can however use the Global Script (Tools -> Script Editor) to create a script that exports all data into Metastock ascii format.



Hemmie
2010-11-02 16:00:54

  0

Could you point to me to a start-up script and what fields I should use and in what order to construct a metastock ascii csv file.

Thanks



QuantShare
2010-11-03 05:32:50

  0

Best Answer
Yes of course.

- Select "Tools" then "Script Editor"
- Create a new file
- Here is an example of a script that exports all historical quotes:


string path = "c:\\database export";

Symbol[] symbols = Symbols.GetSymbols();
for(int i=0;i < symbols.Length;i++)
{
Symbol sym = symbols[i];
HistoricalQuotes quotes = Quotes.GetHistoricalQuotes(sym.Name);
System.Text.StringBuilder builder = new System.Text.StringBuilder("");
for(int j=0;j < quotes.Close.Length;j++)
{
string line = quotes.Date[j].ToString("dd/MM/yyyy") + ";" + quotes.Close[j] + ";" + quotes.Open[j] + ";" + quotes.High[j] + ";" + quotes.Low[j] + ";" + quotes.Volume[j];
builder.AppendLine(line);
}

System.IO.File.WriteAllText(path + "\\" + sym.Name + ".csv", builder.ToString());
}



Sie Ching Han
2015-01-20 05:04:25

  0

Dear sir/madam,

How about the open interest data? the above script is only with volume

Also how to export intraday data?

Thanks



Sie Ching Han
2015-01-20 06:44:44

  0

I found it, here it is "

string path = "c:\\database";

Symbol[] symbols = Symbols.GetSymbols();
for(int i=0;i < symbols.Length;i++)
{
Symbol sym = symbols[i];
HistoricalQuotes quotes = Quotes.GetHistoricalQuotes(sym.Name);
System.Text.StringBuilder builder = new System.Text.StringBuilder("");
for(int j=0;j < quotes.Close.Length;j++)
{
string line = quotes.Date[j].ToString("MM/dd/yyyy") + "," + quotes.Open[j] + "," + quotes.High[j] + "," + quotes.Low[j] + "," + quotes.Close[j] + "," + quotes.Volume[j] + "," + quotes.OpenInterest[j];;
builder.AppendLine(line);
}

System.IO.File.WriteAllText(path + "\\" + sym.Name + ".txt", builder.ToString());
}



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Export Indicators Data - Custom Time Frame
Export Indicators Data with Filtering and Column Labels Support
Export Indicators Data
How far are the close prices from the support line
Equity Export To Excel

How-to Lessons
How to export trading data to a CSV file
How to use QuantShare with Metastock data
How to download and use U.S. stocks earnings data
How to import trading data from CSV files
How to dynamically update the settings of an indicator

Related Forum Threads
Global Script For How To Export In MetaStock Format In Ascii Layo...
How to export intraday data
How to export historical data for a list of symbols
How to asci import file with date in this format YYYYMMDD
Metastock as content type in downloader

Blog Posts
How to Import Metastock data into QuantShare
How to Create a List of Ticker Symbols
How to Create a Custom Real-Time Table using QS Trading Software
How to create buy and sell trading rules based on News Data
Export Trading Orders from a Portfolio to a File









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.