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

Re: [amibroker] Import Data into OI field?



PureBytes Links

Trading Reference Links

OK, I answered my own question:
 

F2Dummy=0;

F2Dummy=ParamTrigger("F2Dummy","F2Dummy");

if(F2Dummy==1);

{

f2_insert = f2; // replace this with something you want to store

f1_insert = f1; // replace this with something you want to store

ab = CreateObject("broker.Application");

AddToComposite(C,"~"+Name()+"Signal","C",128+1+2);

target = ab.Stocks("~"+Name()+"Signal");

qts = target.Quotations;

for(i = 0; i < BarCount; i++)

{

qt = qts.Item(i);

qt.OpenInt = f2_insert[i];

qt.Close = f1_insert[i];

}

//Buy = Sell = 0;

}

----- Original Message -----
Sent: Friday, September 12, 2008 11:45 AM
Subject: Re: [amibroker] Import Data into OI field?

Paul,
 
I saved this email for a long time and I finally got to it.  I got your version below working fine.  A modification to this procedure could theoretically help a lot because I have very large SQL databases that I retrieve data from using the ODBC plug-in.  Right now, I'm using the normal retrieval procedure that does a SQL select command every screen refresh and its taking a very long time - and my computer hangs. 
 
My question is, how would I modify the target ticker's name to be something like ~CSCOSignals so I can input information into the OHLC & OI fields.  What your script below does is inputs data to the OI field of CSCO ticker.
 
TIA!
 
Chris
 
 
----- Original Message -----
From: Paul Ho
Sent: Thursday, March 20, 2008 8:23 PM
Subject: RE: [amibroker] Import Data into OI field?

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.
 


From: amibroker@xxxxxxxxxps.com [mailto:amibroker@yahoogroups.com] On Behalf Of bjagow@xxxxxxxxxxnet
Sent: Friday, 21 March 2008 10:38 AM
To: amibroker@xxxxxxxxxps.com
Subject: [amibroker] Import Data into OI field?

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
 

__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___