PureBytes Links
Trading Reference Links
|
Hello,
This one is mainly for Peter Gialames and the other users
of QuotesPlus COM objects.
With AmiBroker 3.75 beta you can replace new ActiveXObject
with AFL.CreateStaticObject() function call that creates QP2
ActiveX object only once per AmiBroker session.
The initialization of QP2 is extremely slow so static creation
supported now by AmiBroker gives tremendous performance
gain (20-50 times faster).
Check for yourself
MaxGraph = 9;
EnableScript("jscript");
// this is to show only one entry per stock
ticker = Name();
Float = 0;
<%
CInfo = AFL.CreateStaticObject("QuotesPlus.CompanyInfo"); // NEW CreateStaticObject !
CInfo.Symbol = AFL("ticker");
// try-catch block handles the situation when
// QuotesPlus object returns strange values
try
{
AFL("Float") = Number( CInfo.Float() )*100000;
}
catch( e )
{
AFL("Float") = 0;
}
%>
cumvol = LastValue( Cum( Volume ) ) - Cum( Volume );
lastrange = cumvol < Float;
dayone = ExRem( lastrange, 0 );
Graph0 = Close;
hh = LastValue( HighestSince( dayone, High ) );
ll = LastValue( LowestSince( dayone, Low ) );
Graph0 = Close;
Graph0Style=64;
Graph0Color=2;
Graph1 = IIf( lastrange, hh, -1e10 );
Graph2 = IIf( lastrange, ll, -1e10 );
Graph1Style = Graph2Style = 1;
===========================
Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com
|