PureBytes Links
Trading Reference Links
|
--- In amibroker@xxxxxxxxxxxxxxx, "Habibur Md. Rahman Planning Networks" <habib@xxx> wrote:
>
> Hi all Seniors and Experts
>
> I am pretty new to AB. 'Symbol Information' update manually is cumbersome, I am searching for some process to update it from a text file that contains the required information.
>
> Does anybody have the process already developed, Can you please share it? Or can some body please develop a process for this?
>
> Regards
> Habib
>
here is a ruby script. you can review it and change it to any language you need. the symbol data link is also in the script.
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/
|