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

[amibroker] Re: Amibroker --> Excel?



PureBytes Links

Trading Reference Links

thanks a lot for your hints and thoughts. I was already contemplating your second suggestion, to run an AFL and save data as .csv files. This would be feasable if I wanted to do this as a one-time thing. However, I intend to repeat the queries in regular intervals, such as every 5 minutes. In thus this would not be the best way to go. I am not sure whether mentioned API would do the job, I also read the user manual and as I am not as knowledgable in coding as some of you guys here I could not make much sense of how to access specific time series and in what format they would be retrieved. I will keep on trying but looks like nobody here has tried to attempt something similar before. 

Let me work on the broker.application object, maybe I can get something useful out of it....


--- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@xxx> wrote:
>
> I don't know that you'll be able to get to the AmiBroker database without controlling AmiBroker itself. By "control" I just mean that you will likely need to instantiate an instance of the AmiBroker automation object (of type Application) as shown in the link that I sent you.
> 
> I've used the API, but not to do what you are trying. There are examples in the guide for how to instantiate an instance of the Application object. From there it's all trial and error until you get it to do what you want.
> 
> The documentation is VERY sparse in this area. For example; The GetTickerList function on the Stocks object takes an argument, but there is nothing telling us what the argument is supposed to be (presumably the number of a Watchlist). Assuming that you can figure that out, you'll get a string, but what delimiter is used to separate the stocks within the string (presumably comma separated). etc.
> 
> Once you've got the Application object it looks like you could then use the API to gain access to the Stocks object, from which you can get an individual Stock object from which you can get all Quotations from which you can select the desired individual Quotation objects and on and on.
> 
> If this is a one time periodic update, you would likely have a far easier time by just writing a simple AFL script that generates a .csv file, run the .afl and then load the resulting .csv into Excel.
> 
> If you are not 100% sure about whether your intent is going to work out, I would suggest starting with the .csv approach first, as proof of concept. Only then would I spend the time/frustration trying to get the automation to do what I wanted. At a minimum, writing the .afl will solidify exactly what you need the automation to mimic. So, it would not be wasted effort.
> 
> Mike 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "BBMAT" <bbmat@> wrote:
> >
> > thanks, but any pointer to get started? I am not too familiar with the interface and structure though I can code a bit. You would not know of any sample code that accomplishes something similar to what I try to achieve? Again, I dont try to control Amibroker out of VBA/VB scriot, but I try to attain access to the Amibroker database from VBA/VB script alone. 
> > 
> > Thanks
> > Brian
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@> wrote:
> > >
> > > If you are comfortable writing VB script for your macro, you can very likely do what you want by coding against the AmiBroker automation object.
> > > 
> > > http://www.amibroker.com/guide/objects.html
> > > 
> > > Mike
> > >  
> > > --- In amibroker@xxxxxxxxxxxxxxx, "BBMAT" <bbmat@> wrote:
> > > >
> > > > I took the time to screen old messages for posts about ODBC and Excel but I could not find what I was looking for. Basically all proposed solutions deal with how to extract data from other databases into AmiB. However, I look for the opposite. Having Amibroker running, I basically want to extract a time series for a specified ticker and start time - end time from the Amibroker Database into Excel or VBA (as array). I dont want to have to run an AFL or so. I simply want to run a macro in VBA which then communicates with Amibroker to extract the data and loads them directly into a specified array.
> > > > 
> > > > Is this at all doable or am I asking for something that has not been done yet?
> > > > 
> > > > Thanks a lot for all your help and ideas!!!
> > > > 
> > > > 
> > > > --- In amibroker@xxxxxxxxxxxxxxx, "ozzyapeman" <zoopfree@> wrote:
> > > > >
> > > > > Amibroker supports ODBC so you can apparently write directly to Excel.
> > > > > 
> > > > > I'm not familiar with ODBC myself, but others on this forum, and the automated trading forum, have done exactly what you want to do. 
> > > > > 
> > > > > Try a search for ODBC and excel on this forum (if Yahoo decides to cooperate this morning!).
> > > > > 
> > > > > 
> > > > > --- In amibroker@xxxxxxxxxxxxxxx, "droskill" <droskill@> wrote:
> > > > > >
> > > > > > Haven't looked at this myself but might be worth looking at:
> > > > > > 
> > > > > > http://www.icc-az.com/
> > > > > > 
> > > > > > Under links - goto Amibroker - there is an Excel program for getting data from AB.
> > > > > > 
> > > > > > Don't know if it will do what you want but I thought I'd mention it.
> > > > > > 
> > > > > > 
> > > > > > --- In amibroker@xxxxxxxxxxxxxxx, "BBMAT" <bbmat@> wrote:
> > > > > > >
> > > > > > > Hello,
> > > > > > > 
> > > > > > > I am wondering whether anybody has got experience with sending data out of Amibroker directly to Excel? Here is what I try to achieve: I like to specify a ticker and barsize as well as number bars and dump those from Amibroker directly into Excel, no manual saving of data into text files and then re-opening those files in Excel. Why Excel? I use those timeseries to perform computations, calculations of custom indexes and I like to the flexibility in Excel to display the results and numbers in a speadsheet-like way for my trading. So, I basically look for a way to get historical intra-day data directly into Excel. I use IB as broker but dont like the ActiveX and DDE solutions they provide. I figured because AMIBROKER already has got the data in an efficient database that it should not be a problem to simply specify a subset and dump it into Excel (can Amibroker use OLE, meanin control Excel, such as opening a sheet, and then writing some data from the database into the sheet?). 
> > > > > > > 
> > > > > > > Any help would be greatly appreciated. 
> > > > > > > 
> > > > > > > Thanks
> > > > > > > Thomas
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>




------------------------------------

**** 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/