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

Re: [amibroker] Re: Import Data into OI field?



PureBytes Links

Trading Reference Links

Clever, Brian.
Thanks for the COM urls.

Bob
----- Original Message ----- 
From: "brian_z111" <brian_z111@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, March 21, 2008 6:17 AM
Subject: [amibroker] Re: Import Data into OI field?


> Here is a way to do that.
> 
> A method to import extra data into AmiBrokers Open Interest field 
> using AmiQuote with Yahoo data downloads.
> 
> (this is a basic method that can be developed for wider use).
> 
> a) Open AB and create a new, blank, database.
> 
> b) Open AmiQuote and add a ticker e.g. PRXL
> 
> Note: PRXL had a 2:1 stock split on 03-03-2008
> 
> c) Download PRXL historical WITHOUT selecting "Automatic Import" - 
> leave AQ open.
> 
> d) Go to AmiBroker/Formats folder and open the aqh.format file.
> 
> Note: it is a text file and it will open in NotePad
> 
> Add OpenInt to the format profile and save.
> 
> e) Go to AmiBroker/AmiQuote/Downloads and rename the PRXL.aqh file to 
> PRXL.csv then open it, add any required data to the column after the 
> adjClose and save it.
> 
> Once it is saved change the name back from .csv to .aqh
> 
> 
> 
> f) return to AmiQuote and select Tools >> Import into AmiBroker (the 
> data in the PRXL.aqh file, including the data in the OI field, will 
> be imported into the open AmiBroker database.
> 
> There is a temporary file with picies at the UKB:
> 
> http://www.amibroker.org/userkb/2008/03/21/amiquote-ascii-importing/
> 
> note: after changing the .csv file back to a text file I had to pick 
> some (PRXL) commas out of my teeth.
> 
> Thanks to Bob for a very nice lead.
> 
> brian_z
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "brian_z111" <brian_z111@xxx> wrote:
>>
>> FTR,
>> 
>> Here are some highlights from previous discussions.
>> 
>> The COM method seems to be a step-up from what has gone before?
>> 
>> http://finance.groups.yahoo.com/group/amibroker/message/91622
>> 
>> http://finance.groups.yahoo.com/group/amibroker/message/118009
>> 
>> http://finance.groups.yahoo.com/group/amibroker/message/80876
>> 
>> http://finance.groups.yahoo.com/group/amibroker/message/61353
>> 
>> brian_z
>> 
>> 
>> 
>> 
>> 
>> --- In amibroker@xxxxxxxxxxxxxxx, "paultsho" <paultsho@> wrote:
>> >
>> > --- In amibroker@xxxxxxxxxxxxxxx, <bjagow@> wrote:
>> > >
>> > > Although I understand that additional AB data arrays [and means 
>> of 
>> > populating them] are planned for the future, I'd like to store a 
>> > weekly value into the OI field.of existing tickers.
>> > > 
>> > > Any way to do this with AmiQuote?
>> > > If not, how about with fget, etc?
>> > > 
>> > > TIA,
>> > > Bob
>> > >
>> > Bob
>> > You can't do it in Amiquote or fget, but you can do it with COM 
>> > objects.
>> > The following example gives you a means
>> > Ranking = C;  // replace this with something you want to store
>> > ab = createobject("broker.Application");
>> > target = ab.Stocks(name());
>> > qts = target.Quotations;
>> > for(i = 0; i < Barcount; i++)
>> > {
>> >     qt = qts.Item(i);
>> >     qt.OpenInt = Ranking[i];
>> > }
>> > buy = sell = 0;
>> >  
>> > Run scan over tickers that you want. and Remember to refresh all 
> to 
>> > see the changes
>> > It is very important to know that AB does not detect the OI field 
>> for 
>> > changes, so if there is no other changes in your database, 
> pressing 
>> > save doesnt save your changes in OI (at least that was the case 
> in 
>> > the past), To force save, choose save database as, or make some 
>> sure 
>> > there are some other changes in your database and press save. 
>> > Otherwise, the OI fields would be blank next time you open it.
>> > Good luck.
>> >
>>
> 
> 
> 
> ------------------------------------
> 
> 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
> 
> 
> 

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

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/