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

[amibroker] Re: Learning



PureBytes Links

Trading Reference Links

Dominic,

Your pat is a condition, its value is either 1 [true] or 0 [false].
Your ref(pat,-1) is the previous value of pat and it will be also 1 
or 0.
The condition
C>ref(pat,-1)
is equivalent to 
C>1 [respectively C>0]
If, for example, you search MSFT, the condition will be true for 
every bar [remember, true means value equal to 1] and, consequently, 
cum(C>ref(pat,-1)) will be equal to cum(1)
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "dom1_1998" <Dom2000@xxxx> wrote:
> I'm praticing to understand formulas.  I have written this test 
pattern;
> 
> pat=Ref(C,-3) < Ref(C,-4) AND Ref(C,-2) <Ref(C,-3)AND
> Ref(C,-2)<Ref(C,-1)AND C>Ref(C,-1);
> 
> totpat=Cum(pat);
> day1up=Cum(Ref(pat,-1)AND C>Ref(C,-1));
> 
> I totaled the patterns with cum(pat).  But when I tried to total the
> day1up patterns with day1up=cum(c>ref(pat,-1);  It wouldn't work.
> I had to use the formula above (day1up=Cum(Ref(pat,-1)AND C>Ref(C,-
1));
> 
> Why doesn't the cum(c>ref(pat,-1) work??  Doesn't it say total only
> the number of closes that are greater than the pattern yesterday?
> 
> TIA,
> 
> Dominick


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/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/