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

[amibroker] Re: adding a counting column



PureBytes Links

Trading Reference Links

Rick,

Make sure you are running this over a group of symbols as an 
exploration from the AA window and it will work.....

regards,
Tom

--- In amibroker@xxxxxxxxxxxxxxx, Rick Osborn <ricko@xxx> wrote:
>
> When I run the code I get blanks in the "counter"
> column.
> 
> Is there a setting I need to change perhaps?
> 
> Rick
> 
> --- Yuki Taga <yukitaga@xxx> wrote:
> 
> > Hi Tom,
> > 
> > This works very nicely, as long as I take out the
> > 
> > Buy=Filter=1 statement,
> > 
> > and use my own exclusionary filter.  It returns just
> > what I want, and
> > consecutively numbers the rows.
> > 
> > Many thanks,
> > 
> > Yuki
> > 
> > Friday, January 5, 2007, 4:27:00 PM, you wrote:
> > 
> > t> Yuki,
> > 
> > t> Try this:
> > t>
> > ---------------------------------------------------
> > t> counter = 0;
> > t> if(Status("stocknum") == 0)
> > t> StaticVarSet("string",0);
> > 
> > t> Buy=Filter= 1;
> > 
> > t> counter = StaticVarGet("string");
> > 
> > t> if(LastValue(Filter))
> > t> {
> > t> counter++;
> > t> StaticVarSet("string",counter);
> > t> }
> > 
> > t> AddColumn(counter, "counter",1.2,colorBlue);
> > 
> > t> regards,
> > t> Tom
> > 
> > 
> > 
> > t> --- In amibroker@xxxxxxxxxxxxxxx, Yuki Taga
> > <yukitaga@> wrote:
> > >>
> > >> This is probably very simple for all you
> > natural-born coders out
> > >> there, but not for me.
> > >> 
> > >> I want to add a column to an exploration (that
> > part is easy enough),
> > >> but I want to have that column simply return a
> > '1' on the first row,
> > >> then increment by 1 for each additional row.
> > >> 
> > >> AA output gives me the total number of rows of
> > course, but sometimes
> > >> I want to know where, say, the middle of the pack
> > is, or the
> > >> upper-third, or lower-third -- without having to
> > count from the first
> > >> row or the last row.
> > >> 
> > >> Anyone?
> > >> 
> > >> Yuki
> > >>
> > 
> > 
> > 
> >  
> > Best,
> > 
> > Yuki
> > 
> > 
> 
> 
> Rick Osborn & Associates
> 885 Sorrento Ave.
> Oshawa, Ontario L1J 6V6
> (905) 728-8543  fax 728-0815
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.6/617 - Release Date: 1/5/2007 11:11 AM