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

[amibroker] Accessing qp2 data with activeX



PureBytes Links

Trading Reference Links

Hi all,

I found the following code pretty useful for accessing qp2 data(such as QuotesPlus.RevEps) with AFL formula. However, I could not find additional information for this functionality. I want to access additional data such as estimated earnings in QP2, do anyone know where I can find such documentation.

Thanks in advance!

<%

try
{

RevEps = new ActiveXObject("QuotesPlus.RevEps");
CInfo = new ActiveXObject("QuotesPlus.CompanyInfo");
RevEps.Symbol = AFL("ticker");
CInfo.Symbol = AFL("ticker");

AFL("RevQtr0") = Number(RevEps.Revenues(0)); // THIS RULES GIVE ERROR


// AND SO ... SHOULD CHECK IF DATA IS AVAILABLE OR

// THROW AN ERROR ...
AFL("RevQtr1") = Number(RevEps.Revenues(-1));
AFL("RevQtr2") = Number(RevEps.Revenues(-2));
AFL("RevQtr3") = Number(RevEps.Revenues(-3));
AFL("RevQtr4") = Number(RevEps.Revenues(-4));
AFL("EarQtr0") = Number(RevEps.Earnings(0));
AFL("EarQtr1") = Number(RevEps.Earnings(-1));
AFL("EarQtr2") = Number(RevEps.Earnings(-2));
AFL("EarQtr3") = Number(RevEps.Earnings(-3));

}
catch( e )
{
}

%>
RevFac=1.05; // 10% increase in revenues
EarFac=1.05; // 10% increase in earnings
//RevCond=(RevQtr0>RevFac*RevQtr1) AND (RevQtr1>RevFac*RevQtr2) AND(RevQtr2>RevFac*RevQtr3);
//EarCond=(EarQtr0>EarFac*EarQtr1) AND (EarQtr1>EarFac*EarQtr2) AND(EarQtr2>EarFac*EarQtr3);




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/