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

Re: [amibroker] Re: How to count the number "1"



PureBytes Links

Trading Reference Links

Dominick,

Its all because you have stated your question unclear at the first place.
You should ask
"how do I count how many **symbols** in database/watchlist 
are matching my custom condition"

You have asked "how to count the number of '1' in the array which is returned from cross function'.

My aswer was 100% correct to YOUR ORIGINAL question.
The array returned by CROSS function represents crosses in SINGLE symbol.

Than you changed your question 
"If I have a result column with 1 + 0's. I would like to total the ones
in the result column"
without saying what your 'column' really represents.
(the exploration column can hold one or MANY entires per ONE or MANY symbols).

After second answer you have finally provided your exploration code
that you were thinking of. If you did at the first place or stated
your question correctly you would get correct answer to your real problem
at the first place.

As to your "  I wonder how big of a program nightmare it would be to be able to  perform a count using the column' name?"

If you want to make it 'easy' just use 

newhigh=H>Ref(HHV(C,250),-1)+Close < 20 AND Volume > 200000;
Filter=newhigh;  // <- LOOK HERE
AddColumn(newhigh,"HH52",1.2);
AddColumn(Close,"close",1.2);

instead in your exploration and you will be able to read the number of '1'
from the status bar line of the AA window showing number of rows in the result list.

This exactly is explained in very detail in VIDEO TUTORIAL that you should watch 
first as a beginner:
http://www.amibroker.neostrada.pl/video/exploration.html

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "dom1_1998" <Dom2000@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, August 22, 2003 5:39 AM
Subject: [amibroker] Re: How to count the number "1"


> Thanks Anthony.  I'll give it a go.
> 
> I wonder how big of a program nightmare it would be to be able to
> perform a count using the column' name?  
> 
> I was thinking if I wanted to perform a bottom up analysis of the
> market, I would enter the condition to obtain a true or false then
> count them by saying something like Cum(columnname("Highs"));
> 
> BTW.  How are you making out on the Pattern stats? :))
> 
> Dominick
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx>
> wrote:
> > dom,
> > 
> > You could try this:
> > 
> > load into AA window....and Run **Scan** First, this sets up your
> > AddtoComposite ticker....Then run explore....you should see the
> count of how
> > many tickers in your watchlist meet the NewHigh Criteria....
> > 
> > newhigh=H>Ref(HHV(C,250),-1) AND Close < 20 AND Volume > 200000;
> > 
> > Buy=0;
> > 
> > AddToComposite(NEWHIGH,"~NEWhIGH","X");
> > 
> > Filter=newhigh > 0;
> > 
> > AddColumn(ValueWhen(newhigh,C),"Close");
> > 
> > AddColumn(Foreign("~NEWhIGH","X"),"NEWhIGHS",1);
> > 
> > Anthony
> > 
> > 
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.511 / Virus Database: 308 - Release Date: 8/18/2003
> 
> 
> 
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
> 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/