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

Re: [amibroker] Re: Float Analysis



PureBytes Links

Trading Reference Links

Dear Peter,

The code below (tested with QP2) should work just fine for you:

//////////////////////////

MaxGraph = 9;

EnableScript("jscript");

// this is to show only one entry per stock

ticker = name();

<%
CInfo = new ActiveXObject("QuotesPlus.CompanyInfo");
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


----- Original Message ----- 
From: "Peter Gialames" <investor@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, September 20, 2001 8:40 PM
Subject: RE: [amibroker] Re: Float Analysis


> Tomasz and Dimitris,
> 
> Thank you for your suggestions ... but I am still having difficulties.
> 
> For an example look at BRKS. It has a float of 14.5 million shares. If you
> sum the volume backward you will see that the turnover start point was
> 7/31/01. In that time the lowest low has been 28.51 (9/19/01) and the
> highest high has been 54.25 (8/2/01).
> 
> Now I would like to have horizontal lines drawn at 54.25 & 28.51 (It would
> be great if this channel would only be drawn in the period in question -
> 7/31-present). My code is drawing one horizontal line at 33.23?
> 
> Here is what I have:
> 
> MaxGraph = 9;
> 
> EnableScript("jscript");
> 
> // this is to show only one entry per stock
> 
> ticker = name();
> 
> <%
> CInfo = new ActiveXObject("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;
> }
> 
> 
> %>
> 
> // Cum( Volume ) gives accumulated volume
> // Cum( Volume ) >= Float give "true" for all bars after cumulated volume
> // is equal or greater to float
> // ExRem() removes "true" on every bar after the first bar when above
> condition is met
> 
> cumvol = LastValue( cum( volume ) ) - cum( volume );
> dayone = valuewhen(cumvol>float,1);
> 
> graph0 = close;
> 
> // Now we simply calculate the most recent values of HighestHigh and
> LowestLow from dayone
> 
> hh = LastValue( HighestSince( dayone, high ) );
> ll = LastValue( LowestSince( dayone, low ) );
> 
> graph0 = close;
> graph0style=64;
> graph0color=2;
> 
> graph1 = hh;
> graph2 = ll;
> graph1style = graph2style = 1;
> 
> 
> -----Original Message-----
> From: Tomasz Janeczko [mailto:amibroker@x...]
> Sent: Thursday, September 20, 2001 12:38 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] Re: Float Analysis
> 
> 
> Hello,
> 
> In that case Peter should use:
> 
> cumvol = LastValue( cum( volume ) ) - cum( volume );
> 
> Best regards,
> Tomasz Janeczko
> ===============
> AmiBroker - the comprehensive share manager.
> http://www.amibroker.com
> 
> 
> ----- Original Message -----
> From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, September 20, 2001 10:50 AM
> Subject: [amibroker] Re: Float Analysis
> 
> 
> > Dear Tomasz,
> > I understood that Peter asks for the sum of volumes the last n days.
> > "backwards until the accumulated volume is greater than..."
> > cum(volume) gives accumulated volume from the first day.
> > Take a look at this.
> > Best Regards
> > Dimitris Tsokakis
> > --- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> > > Dear Peter,
> > >
> > > First - you can have a loops in AFL scripting
> > > (take a look at http://www.amibroker.com/docs/ab400.html)
> > >
> > > Second - you probably can do the whole thing without
> > > the need to use script ;-)
> > >
> > > Float = 30000000; // replace this with retrieving real float but
> > please remember that
> > > // this one is in 1's of shares (not 100's or
> > 1000's)
> > >
> > > // Cum( Volume ) gives accumulated volume
> > > // Cum( Volume ) >= Float give "true" for all bars after cumulated
> > volume
> > > // is equal or greater to float
> > > // ExRem() removes "true" on every bar after the first bar when
> > above condition is met
> > >
> > > dayone = ExRem( Cum( Volume ) >= Float, 0 );
> > >
> > > graph0 = close;
> > >
> > > // Now we simply calculate the most recent values of HighestHigh
> > and LowestLow from dayone
> > >
> > > hh = LastValue( HighestSince( dayone, high ) );
> > > ll = LastValue( LowestSince( dayone, low ) );
> > >
> > > graph1 = hh;
> > > graph2 = ll;
> > > graph1style = graph2style = 1;
> > >
> > > Third: Ref() is fast. It was mentioned that Foreign() isn't that
> > fast.
> > >
> > > Best regards,
> > > Tomasz Janeczko
> > > ===============
> > > AmiBroker - the comprehensive share manager.
> > > http://www.amibroker.com
> > >
> > >
> > > ----- Original Message -----
> > > From: "Peter Gialames" <investor@xxxx>
> > > To: <amibroker@xxxx>
> > > Sent: Wednesday, September 19, 2001 9:28 PM
> > > Subject: [amibroker] Float Analysis
> > >
> > >
> > > > Hello Tomasz,
> > > >
> > > > I am trying to code a volume analysis function similar to Steve
> > Woods idea.
> > > > This is a "backward cumulative count of the volume ... studied in
> > relation
> > > > to a stock's floating supply of shares."
> > > >
> > > > Now float is a variable found in Quotes Plus that is easily
> > accessible via
> > > >
> > > > <%
> > > > CInfo = new ActiveXObject("QuotesPlus.CompanyInfo");
> > > > CInfo.Symbol = AFL("ticker");
> > > > try
> > > > {
> > > > AFL("Float") = Number( CInfo.Float() );
> > > > }
> > > > catch( e )
> > > > {
> > > > AFL("Float") = 0;
> > > > }
> > > > %> //->Thanks Steve Wiser
> > > >
> > > > Now that we have the Float we need to accumulate volume, on a day
> > to day
> > > > basis, backwards until the accumulated volume is greater than the
> > float
> > > > (volume turnover). This is our starting date.
> > > >
> > > > From this date we need to find the highest high and the lowest
> > low over this
> > > > period of time and draw channel lines (horizontal line over
> > highest high and
> > > > horizontal line over lowest low).
> > > >
> > > > Now where I am stuck is on how to accumulate the volume
> > backwards. AFAIK
> > > > the only way to do this is (excuse my VB syntax):
> > > >
> > > > i=1
> > > > do while accumVol <> float
> > > > accumVol=ref(vol,-i)
> > > > if ref(high,-i)>highestHIGH then
> > > > highestHIGH=ref(high,-i)
> > > > endif
> > > > if ref(low,-i)<lowestLOW then
> > > > lowestLOW=ref(low,-i)
> > > > endif
> > > > i=i+1
> > > > loop
> > > >
> > > > But AFL does not support looping, right? If there is another way
> > of
> > > > achieving this calculation, please let me know.
> > > >
> > > > Also, I have read about the ref() function not being that
> > efficient. Is
> > > > there an easier way to reference other values in the array (close
> > (-1),
> > > > volume(-2), high(-i))?
> > > >
> > > > Thanks in advance,
> > > > Peter Gialames
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> > > >
> > > >
> > > >
> >
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
> >
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> 
> 
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>