[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: COM/ActiveX - Delphi



PureBytes Links

Trading Reference Links

I dont know about delhpi. i use ruby and it is as powerful as it 
gets. simple steps are like below
the symbol file looks like this

GEMMX	GMO EMERGING MARKETS FUND CLASS VI	NASDAQ
GEMRX	NATIONWIDE EMERGING MARKETS FD CL R	NASDAQ
GEMSX	GOLDMAN SACHS EMERGING MARKETS FUND SER	NASDAQ
GEMVX	GMO EMERGING MARKETS FUND CLASS V	NASDAQ
GEMXX	GE MONEY MARKET FUND CLASS A	NASDAQ
GENBA	GENESEE CORP CL A	OTCBB
GENBB	GENESEE CORP CL B	OTCBB
GENBX	NATIONWIDE GLOBAL NATURAL RESOURCES FD	NASDAQ
GENDX	GENDEX FUND INVESTOR CLASS	NASDAQ
GENE	GENETIC TECHNOLOGIES LTD	NMS
GENG	GLOBAL ENERGY GROUP	OTC
GENH	GENESIS HOLDINGS INC	OTCBB
GENI	GENESISINTERMEDIA	OTC
GENR	GENAERA CORP	SMCAP
GENSF	GENUS PLC ORD	OTC
GENT	GENTIUM SPA ADR	NMS
GENV	GLOBETECH ENVRN	OTC
GENX	GENEX PHARMACEUTICAL	OTC
GENXX	GENERAL CALIFORNIA MUNICIPAL MONEY MARK	NASDAQ
GENY	GENERAL ENERGY RES &	OTC
GENZ	GENZYME CORP	NMS



NASDAQ=1
rows=FasterCSV.open("c:\\temp\\mktsymbols.txt",
{:headers=>:first_row,:col_sep=>"\t" ,:skip_blanks=>true})
        nasdaqStocks=Array.new
        
        rows.each{|r|
            
            case r['EXCHANGE']
                when  'NMS'
                nasdaqStocks<<r    
               
            end     
            
            
            }
amibroker = WIN32OLE.new("Broker.Application")
        amibroker.loadDatabase("E:\\Data\\Stocks") #load the database
        stocks=amibroker.stocks
        nasdaqStocks.each{|stk|
        begin
            stock=stocks.add(stk["SYMBOL"])
            stock.FullName=stk["DESCRIPTION"]
            stock.MarketID =NASDAQ
            
        rescue => detail
            print detail.backtrace.join("\n")
            puts stk.to_s
        end 
        amibroker.SaveDatabase()
        amibroker.quit()



--- In amibroker@xxxxxxxxxxxxxxx, Susan Sarana <susansarana@xxx> 
wrote:
>
> Hello,
> 
> i have read the description in the AmiBroker help about ActiveX and 
it sounds very powerful if i could get it to start. Based on the help 
it also seems to be very easy, but i still can't get it to work. Can 
someone please tell me the steps to create it with Delphi and/or can 
someone send me a sample project please?
> I highly appreciate every help i can get.
> 
> Here is the part from the help. In the help is some additional 
information and snapshots, but i have copied the main steps below. 
You can find the description in the help through the following search 
text: Component Object Model support in AFL
> 
> Regards
> Susan
> 
> 
> Using external COM/ActiveX objects in AFL
> In a very similar way we can call functions (methods) in an 
external COM objects directly from the AFL formula. Here I will show 
how to write such external ActiveX in Visual Basic but you can use 
any other language for this (Delphi for example is very good choice 
for creating ActiveX/COM objects).
> It is quite easy to create your own ActiveX DLL in Visual Basic, 
here are the steps required:
> 
> Run Visual BasicIn the "New project" dialog choose "ActiveX DLL" 
icon - this will create the "Project1" that looks like in the picture 
on the right: 
> Now click on the (Name) and rename the "Project1" to something more 
meaningfull, for example "MyAFLObject" Then double click on 
the "Class1" in the project tree item. The code window will get the 
title of "MyAFLObject - Class1 (Code)" as shown below:Now you should 
choose Run->Start in Visual Basic to compile and run the 
> component. The code in Visual Basic will wait until external 
process accesses 
> the code. 
> To access the freshly created ActiveX we will use the following AFL 
formula (enter it in 
> the Formula Editor and press Apply):
> _________________________________________________________________
> Die neue Generation der Windows Live Services - jetzt downloaden!
> http://get.live.com
>




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
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/