| 
 PureBytes Links 
Trading Reference Links 
 | 
CUM() function can do the job.
Write first your condition
COND=...
Then define the total occurrences of your COND with
y=cum(COND);
The next step is to divide y by cum(1).
Example
COND=C>REF(C,-1) AND REF(C,-1)>REF(C,-2) AND REF(C,-2)>REF(C,-3) AND 
REF(C,-3)<REF(C,-4) AND REF(C,-4)<REF(C,-5);
Y=Cum(COND);
STAT=100*Y/Cum(1);
for statistics over a specific period,say  200 bars, use 
100*sum(COND,200)/200 instead of cum().
--- In amibroker@xxxxxxxxxxxxxxx, "Eugene" <johngalt1234@xxxx> wrote:
> This has more to do with Statistics...
> 
> I want to find the number of times an event has occurred..
> 
> the number of times the stock closed down two days in a row and then
> closed up the next three days...I then want to know what was it
> performance over the next 5 days.
> 
> Any simple way of doing this???
> 
> TIA
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Coral Calcium for Greater Health - $23.95
http://www.challengerone.com/t/l.asp?cid=2805&lp=calcium2.asp
http://us.click.yahoo.com/MmkSQC/NTVGAA/ySSFAA/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/ 
 
 |