PureBytes Links
Trading Reference Links
|
Anthony,
Thanks for the help, however I am needing a way to determine the
number of stocks in my database. Not the number of bars.
--- In amibroker@xxxx, Anthony Faragasso <ajf1111@xxxx> wrote:
> hello, ct1942
>
> I have attached an exploration for automatic analysis, which counts
> total number of bars in database, and how many times C < 0 and C >=
O.
> Does this help.
> I will read the preceding e-mails, to bring myself up to speed on
what
> you are trying to achieve, and see if I can add.
>
> Anthony
>
>
>
> ct1942 wrote:
>
> > Thank you very much for this answer...however, I was hoping that
> > there might be some type of sum formula that would give me the
total
> > of the database I was scanning so that I could use this scan with
> > multple databases without having to figure how many tickers were
in
> > the database each time I changed databases.
> >
> > I know I'm asking a lot, but I'm not very good at programing, as
you
> > probably can tell.
> >
> > Thanks
> >
> > ct1942
> >
> > --- In amibroker@xxxx, "dtsokakis" <TSOKAKIS@xxxx> wrote:
> > > You should know the total population of your database.
> > > If this number is t and let for ^NDX t=101, then
> > >
> > > t1=Foreign("_WHITECD","V");
> > > t=101;/*put here the population of your database*/
> > > p=100*t1/t;
> > > graph0=p;
> > >
> > > Dimitris Tsokakis
> > >
> > > PS : In Nasdaq100 this number is 101. If you scan other
> > > databases, the number may vary for various reasons.
> > > In this case I use the following technique.
> > > I run two complementary composites, (in your example
> > > C>O and C<=O are two categories including all stocks)
> > > Change the beginning of the code with
> > > /*STOCKS WITH C<=O*/
> > >
> > > values = C<=O;
> > >
> > > EnableScript("vbscript");
> > >
> > > days = Day();
> > > months = Month();
> > > years = Year();
> > > initialize = Status("stocknum") == 0;
> > >
> > > <%
> > > Name = "_NOTWHITECD"
> > >
> > > leaving the rest as it is in /*STOCKS WITH C>O*/
> > > Now, after two runs, you know how many stocks have C>O and
> > > how many C<=O. in Ind builder you may have
> > >
> > > t1=Foreign("_WHITECD","V");
> > > t2=Foreign("_NOTWHITECD","V");
> > > t=t1+t2;
> > > p=100*t1/t;
> > > graph0=p;
> > >
> > > It looks strange but, we do not have a direct method to count in
> > > AFL world, although counting is the first thing we need.
> > > Even when you scan or Explore, there is not any counter in the
> > results
> > > table.
> > > So, counting is covered with such tricks.
> > > Dimitris Tsokakis
> > >
> > > --- In amibroker@xxxx, "ct1942" <ct1942@xxxx> wrote:
> > > > Dimitris,
> > > > Can you show me how graph this as a percent?
> > > >
> > > > TIA,
> > > > ct1942
> > > >
> > > > --- In amibroker@xxxx, "dtsokakis" <TSOKAKIS@xxxx> wrote:
> > > > > Hi,
> > > > > In Automatic analysis paste the
> > > > >
> > > > > /*STOCKS WITH C>O*/
> > > > >
> > > > > values = C>O;
> > > > >
> > > > > EnableScript("vbscript");
> > > > >
> > > > > days = Day();
> > > > > months = Month();
> > > > > years = Year();
> > > > >
> > > > > initialize = Status("stocknum") == 0;
> > > > >
> > > > > <%
> > > > > Name = "_WHITECD"
> > > > >
> > > > > days = AFL("days")
> > > > > months = AFL("months")
> > > > > years = AFL("years")
> > > > > values = AFL("values")
> > > > > initialize = AFL("initialize")
> > > > >
> > > > >
> > > > > Set oAB = CreateObject("Broker.Application")
> > > > >
> > > > > If initialize Then
> > > > > oAB.Stocks.Remove( Name )
> > > > > End If
> > > > >
> > > > >
> > > > > Set comp = oAB.Stocks.Add( Name )
> > > > >
> > > > > For i = 0 To UBound( days )
> > > > >
> > > > > Set qt = comp.Quotations.Add( years( i ) & "-" & months
(
> > i )
> > > > & "-
> > > > > " & days( i ) )
> > > > > If values( i ) = 1 Then qt.Volume = qt.Volume + 1
> > > > >
> > > > > Next
> > > > >
> > > > > If initialize Then
> > > > > oAB.RefreshAll()
> > > > > End If
> > > > >
> > > > > %>
> > > > >
> > > > > Buy = 0;
> > > > > /*end of code*/
> > > > >
> > > > > Scan All Stocks for All quotations.
> > > > > Now, in Ind. builder paste the
> > > > >
> > > > > Graph0=Foreign("_WHITECD","V");
> > > > > and you will see the graph of stocks with Close>Open per
Day.
> > > > > (I named the artificial ticker "_WHITECD", because your
> > condition
> > > > is
> > > > > a white candle.)
> > > > > The technique is described in
> > > > > http://www.amibroker.com/newsletter/12-2001.html
> > > > >
> > > > > Dimitris Tsokakis
> > > > > --- In amibroker@xxxx, "kbennett99" <kbennett@xxxx> wrote:
> > > > > > I think I'm out of my depth, but is there any way I could
> > > > > accomplish
> > > > > > the following ?
> > > > > >
> > > > > > By way of example only, could I count the number of Naz
100
> > > > stocks
> > > > > > which closed above the open each day, and plot this number
> > over
> > > a
> > > > > > period of time ?
> > > > > >
> > > > > > Keith B
> >
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
> Cond1=C<O;
> Cond2=C>=O;
> Cond3=Cum(1); // number of bars in database
> Cond4=LastValue(Cum(1));
> Cond5=LastValue(Cum(Cond1));
> Cond6=LastValue(Cum(Cond2));
>
> Filter=Cond3>0;
>
> AddColumn(Cond4,"total",1.2);
> AddColumn(Cond5,"C < O",1.2);
> AddColumn(Cond6,"C >= O",1.2);
|