Click here to Login





                                                   Export to CSV the whole database including symbols


Previous - 0 1 2
momet
2019-05-08 15:06:50

  0

Hi Guys, i want to export historical data from an indicator. what should i do for it?


QuantShare
2019-05-09 09:59:01

  0

Hi,

Please use one of these:
Export Indicators Data
Export Indicators Data with Filtering and Column Labels Support
Export Indicators Data - Custom Time Frame





Export Indicators Data (by QuantShare, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item
Export Indicators Data with Filtering and Column Labels Support (by Kyra Packens, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item
Export Indicators Data - Custom Time Frame (by QuantShare, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item

GS
2021-12-31 23:44:17

  0

Hello QS,

With reference to this script:

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

System.IO.File.WriteAllText(@"c:\quotes.csv", text.ToString());


Would it be possible for me to export Open Interest Data also (I have it in my historical database)? I tried the following modification but it did not work:

text.AppendLine(sym.Name + ";" + quotes.Date[j].ToString("dd/MM/yyyy") + ";" + quotes.Close[j]+ ";" + quotes.Open[j] + ";" + quotes.High[j] + ";" + quotes.Low[j] + ";" + quotes.Volume[j] + ";" + quotes.OpenInt[j]);


Looking forward to seeing your quick response.

Thanks and best regards
Ghanshyam



R P
2024-01-07 07:23:41

  0

@Quantshare

How can I export Last few months update? for example if I want to export just the last one month update only? How do I do that?

Thanks in advance!!



QuantShare
2024-01-08 23:31:33

  0

You need to add a condition after the "for" statement
Something like

if(DateTime.Now.Subtract(quotes.Date[j].Year).Days < 31)
{
text.AppendLine(sym.Name + ";" + quotes.Date[j].ToString("dd/MM/yyyy") + ";" + quotes.Close[j]+ ";" + quotes.Open[j] + ";" + quotes.High[j] + ";" + quotes.Low[j] + ";" + quotes.Volume[j]);
}



R P
2024-01-09 14:16:00

  0

I will try this!! Thanks!


No more messages
Previous - 0 1 2




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
Ticker Symbols List of the National Stock Exchange, NSE, India
Export Indicators Data - Custom Time Frame
Leading Index for the United States
Tweet Sentiment Index for the Forex and Stock Market
Update the Stock Exchange Associated With U.S. Stocks - Market Fi...

How-to Lessons
How to quickly select stocks based on the last value of a databas...
How to export trading data to a CSV file
How to import trading data from CSV files
How to quickly download the most recent EOD data for your stocks
How to display the number of notes per stock

Related Forum Threads
Export Custom Database data - all symbols - including text fields
Create and Export each database for each market
How to import to database from a csv file?
Export database by industry list
How to export historical data for a list of symbols

Blog Posts
How to Create a List of Ticker Symbols
Different Ticker Symbols for Each Data Source
Sentiment Analysis: How to measure the sentiment score of your st...
Ranking stocks based on their correlation with the S&P 500 Index
How to measure market strength with the composite tool









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.