Title: Re: [amibroker] Re: Need some help setting up DTN folders
Thank you m,
Does this code create categories for all tickers in the list?
How does on run 'ruby' code?
thanks,
herman
Saturday, March 28, 2009, 8:25:58 AM, you wrote:
> yes. its just a csv file. i use it to import my TSE tickers. here is a ruby
> script that you can simulate in anyother languange of your preference.
> require 'fastercsv'
> require 'win32ole'
> class ImportSymbols
>
> TSE=4
> def loadSymbols(databaselocation)
>
>
> # downlload symbols from
> http://www.dtniq.com/product/mktsymbols.zip
>
> rows=FasterCSV.open("c:\\temp\\mktsymbols.txt",{:headers=>:first_row,:col_sep=>"\t" ,:skip_blanks=>true})
> importStocks=Array.new
>
> rows.each{|r|
>
> case r['EXCHANGE']
> when 'TSE'
> importStocks<<r
>
> end
>
>
> }
> puts importStocks.length
> amibroker = WIN32OLE.new("Broker.Application")
> amibroker.loadDatabase(databaselocation) #load the database
> stocks=amibroker.stocks
> importStocks.each{|stk|
> begin
> stock=stocks.add(stk["SYMBOL"])
> stock.FullName=stk["DESCRIPTION"]
> stock.MarketID =TSE
>
> rescue => detail
> print detail.backtrace.join("\n")
> puts stk.to_s
> end
>
> }
>
> amibroker.SaveDatabase()
> amibroker.quit()
>
>
> end
> end
> test=ImportSymbols.new
> test.loadSymbols("E:\\Data\\Stocks")
> test.loadSymbols("E:\\Data\\TSE_Data")
> ------------------------------------
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> Yahoo! Groups Links
> <*> To visit your group on the web, go to:
> http://groups.yahoo.com/group/amibroker/
> <*> Your email settings:
> Individual Email | Traditional
> <*> To change settings online go to:
> http://groups.yahoo.com/group/amibroker/join
> (Yahoo! ID required)
> <*> To change settings via email:
> mailto:amibroker-digest@xxxxxxxxxxxxxxx
> mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
> <*> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
> <*> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|