PureBytes Links
Trading Reference Links
|
For examples of code where a signal depends on two events in sequence, see
"Equis - Chande Momentum Oscillator" Expert on your machine. Below are the
buy and sell lines.
{Buy} Cross(BarsSince(Cross(-50,CMO(C,20))),
arsSince( Cross(CMO(C,20),Mov(CMO(C,20),9,S))));
{Sell}
oss(BarsSince(Cross(CMO(CLOSE,20),50)),BarsSince(Cross( Mov( CMO(CLOSE,20),
9,),CMO(CLOSE,20))))
It takes the form of:
Cross(BarsSince(Cross(A,B),BarsSince(Cross(C,D))))
or
Cross(BarsSince(Cross(A,B),BarsSince(Cross(A,D))))
To see if two sets of lines cross on the same day, try something like:
Cross(A,B)=Cross(A,C)
-Corey Saxe
----- Original Message -----
From: "Yarroll" <komin@xxxxxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxxxxxxx>
Sent: Friday, December 07, 2001 10:25 AM
Subject: Containment
> Hello List,
>
> We usually test for specific
> - events {like cross(C,Mov(C,5,S)) }
> - states {like C>Mov(C,5,S)) }
>
> Could someone please suggest a piece of "instrumental" code to check
whether
> one event is contained within another event? That is, one necessarily
> happens when another happens?
> Like, when C crosses above Mov(C,10,S) it obviously crosses above
ov( C,9,
> C,8, C,7 etc.) at the very same day.
>
> This would allow us to maybe locate redundant signals, when a number of
> indicators point to one fact on the very same day, and see where and when
> certain some of these indicators would be unique.
>
> Any idea please?
>
> Thanks,
> Yarroll
>
|