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

Float Analysis Revisited



PureBytes Links

Trading Reference Links

If I wanted to modify the float analysis code (below) to start counting
backward from any date entered how would I do that?

My problem is that I do not completely understand the line
lastvalue(cum(volume))-cum(volume). The way I read it is to sum all the
volume on a given chart and subtract this from the last value of the
cum(volume) array. Now once the cumvol < float this is our starting point.
But what if I wanted to start the counting backwards yesterday - or five
days ago?

I am going to do this in VB also to practice the new powerful features of
AmiBroker, but an explination of how to do this in AFL would be appreciated.

Peter Gialames

MaxGraph = 9;

EnableScript("jscript");

// this is to show only one entry per stock

ticker = Name();

<%
CInfo = AFL.CreateStaticObject("QuotesPlus.CompanyInfo");
CInfo.Symbol = AFL("ticker");

// try-catch block handles the situation when
// QuotesPlus object returns strange values

try
{
AFL("Float") = Number( CInfo.Float() )*1000000;
}
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;


<<attachment: application/ms-tnef>>