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

Re: [EquisMetaStock Group] "AND" operands to functions instead of "OR"



PureBytes Links

Trading Reference Links

Mike

> 2 questions here...
> 1/
> Trying to find a way to have a test condition check for a match on all
data
> periods in the array, rather than just 'one' which passes within the
defined
> period.
>
> ie; the 'Alert' function for instance passes if 'any' of the periods
defined
> match the test conditions. Is there a way to define a test condition
whereby
> ALL of the defined periods have to pass?
> A condition must be true over all of 5 periods.. instead of being held
true
> even if it's true on only one of the periods. A manual way of doing this
is
> using the REF function, but it's very laborious if testing anymore than
just
> a few periods as it has to be tested for each of the historical periods
> referenced.


Sum(C>=Ref(C,-1),5)=5;
is logically the same as..
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);

This example is courtesy of Jose Silva

The expression inside the Sum() gives a binaray TRUE result, i.e. ONE.
Summing this over five periods when the expression was true gives a result
of FIVE, that is, true on each of the last five bars.


> 2/
> 'When' function.
> This is not defined in the list of functions, and not referenced in the
help
> files. However, I have a formula that uses it, but the function itself is
> not defined specifically yet Metastock accepts and uses it?? ..are there
any
> more like this?.. and any help / explanation files around for it (would
like
> to be able to see what it's doing).

C>=Ref(C,-1);
is logically the same as..
When(C>=Ref(C,-1));
and so is..
C>=Ref(C,-1)=TRUE;

Roy





------------------------ 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/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

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