PureBytes Links
Trading Reference Links
|
Ok
I'm sold
I'll have a look and give it a try(maybe I'll learn something new but
this is becoming very time consuming - :)
I'm still trying to do it ( when I'll have some time) in AB first
It should be a simple usefull stat to get in explore -
how many times a xColumn gets "1" s in it
Very frustrating to go tru addtocomposite stuff(great for other
things:)
thx
--- In amibroker@xxxxxxxxxxxxxxx, uenal.mutlu@xxxx wrote:
> Hi quchi,
> here is a similar task realized using the ABtool plugin.
> You can find ABtool in the file and 3rd party areas.
> UM
>
> /*------------------------------------------------------------
> xxCountStocks.afl
>
> Counting stocks during an Exploration run
> using functions in ABtool v0.9.3.7+
>
> Here, an environemnt variable is used to save a
> counter number during an exploration run
>
> Written 030512Mo by Uenal Mutlu
> ------------------------------------------------------------*/
>
> xxABtoolInit();
> MyEnvName = "MySavedCounter"; // give it a name
>
> if (status("stocknum") == 0)
> { // this is executed only for the very first ticker scanned
>
> // save the counter as 0 in the environment variable
> xxEnvSet(MyEnvName + "=" + 0);
>
> // to verify that this is executed only once
> // xxMsgBox("The first stock scanned is: " + Name(), "Info");
> }
>
> // your Buy/Sell/Short/Cover formulas goes here
> // ...
>
> // Filter condition
> if (1)
> Filter = C > 1.25 and C < 35; // for test
> else
> Filter = Buy or Sell or Cover or Short; // for real life
>
> // if stock is in Filter then increment the counter and save it:
> counter = xxToNumber(xxEnvGetValOnly(MyEnvName)); // get the
current value of counter
> if (LastValue(Filter))
> { // increment and save the counter
> counter++;
> xxEnvSet(MyEnvName + "=" + counter);
> }
>
> // print the current value of counter in a column of the results
tab
> // as usual: only those in Filter get printed
> AddColumn(counter, "counter", 1);
>
> //------------------------------------------------------------
>
>
> ----- Original Message -----
> From: "quchi" <adrian@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Monday, May 12, 2003 5:05 AM
> Subject: [amibroker] Counting without AddToComposite
>
>
> > Hi
> >
> > Is it possible to do an Explore on all stocks and display
(addColumn)
> > how many times cond1 and cond2 occurs?
> > For example I have
> > gd=GapDown();
> > gu=GapUp() ;
> > I'd like to display in AA without using AddToComposite how many
> > stocks are gapping up and how many are gapping down.
> > I thought that is gonna be easy/possible with the new
> > for/while etc but I'm kind of lost.
> > Am I on a wrong track? :)
> > Any suggestions will be very helpful
> > thx
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/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/
|