Click here to Login





                                                   Download symbols, update symbols, then download historical data

  0

0
Joshua Laferriere
2020-03-15 12:11:16


I'm not sure if this is under the category of "creating a downloader"

I've had this software for over a year and I'm slowly learning it. I just realized how to add symbols to the left hand pane.

Anyways... I'm trying to automate everything, so rather than manually use quantshare's import symbols from file.

I would like to somehow initiate this symbol importer via startup script loading this mutual funds symbol list from ftp (or at least a way to initiate it from a file I parse from this ftp) as the list is updated daily, then update Quantshare's symbol list (i.e. delist), then download historical data for those symbols

ftp://ftp.nasdaqtrader.com/SymbolDirectory/mfundslist.txt

Pointing me in the right direction is more than fine. Forgive me for my newbness



QuantShare
2020-03-18 11:03:03

  1

Hi Joshua,

In order to automate this. Download the file, add symbols, remove old ones, you would need to create a custom script in C# using "Tools -> Script Editor"

Here is an example of such script: (This one will add symbols)

string data = App.Net.DownloadString("ftp://ftp.nasdaqtrader.com/SymbolDirectory/mfundslist.txt");
string[] lines = data.Split('\ n'); // Remove extra space between \ and n
for(int i=1;i < lines.Length;i++)
{
string symbol = lines[i].Split('|')[0];
Symbols.AddSymbol(symbol);
}



Joshua Laferriere
2020-03-18 14:40:14

  0

I slightly modified the code to crop the last 2 lines from the file in the for loop. I tested (//) by writing to the left hand output pane. It never completes adding symbols, but it will print them just fine.

string data = App.Net.DownloadString("ftp://ftp.nasdaqtrader.com/SymbolDirectory/mfundslist.txt");
string[] lines = data.Split('
'); // Remove extra space between \ and n

//skip last two lines
for(int i=1;i < (lines.Length-2);i++)
{
string symbol = lines[i].Split('|')[0];
Symbols.AddSymbol(symbol);
//Global.Trace1(symbol+"
");
}



Joshua Laferriere
2020-03-19 11:58:35

  0

Best Answer
I've been letting that script run for about 4 hours now and it's not working.


QuantShare
2020-03-25 15:31:57

  0

Since you used Global.Trace, what do you see in the trace (View -> Output)? Do you see the symbol names there?
Maybe the script completed. You will see the button switch from "Cancel" to "Execute".



Joshua Laferriere
2020-03-25 16:15:09

  0

If I uncomment Global.Trace and takeout Symbols.AddSymbol , it will output to the window in about 5 to 30 seconds (I forget tbh, but if I comment Global.Trace1 out and leave in Symbols.AddSymbol, it never finishes executing.


QuantShare
2020-03-31 15:20:19

  0

We just run the script again and we can see new symbols added to the database (Symbols list).

When using:
Global.Trace1(symbol);

It should output all the symbols that are being added to the database. You can see there the progress.



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
US Stock symbols - CUSIP
Historical Tick Data for U.S. Stocks
Madrid Stock Exchange - Historical Data
Hong Kong Stock Exchange - historical data
BSE historical data

How-to Lessons
How to download historical EOD data for penny stocks
How to quickly download the most recent EOD data for your stocks
How to download historical quotes of indices
How to download earnings calendar data for various stocks
How to download and use U.S. stocks earnings data

Related Forum Threads
How to download data for selected symbols ?
How to export historical data for a list of symbols
Download historical splits data
Add new symbols for download
How to update NSE/BSE symbols in QuantShare?

Blog Posts
German Stock Exchanges: 5 free ways to download historical EOD/In...
4 Links to Download Free Historical Stock Prices Data by Date
10 ways to download historical stock quotes data for free
6 places to download historical intraday Forex quotes data for fr...
Download historical EOD data for the stock, futures, ETF and Fore...









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.