PureBytes Links
Trading Reference Links
|
TIA,
Your are looking z in the future, and this mean that the buy
would be generate before you know that su could happen ! I think you should
generate the buy with the trigger z and confirm if the setup was also true today
or in thelast past 4 day:
buy = z and (su and ref(su,-1) or ref(su,-2) or ref(su,-3) or
ref(su,-4));
or the same result but more simple and expressive:
buy = z and barssince(su)<=4;
The above formula return a buy also when su happen the same
day as z but not necessary during the last past 4 days. If you need suto
be true in one of the past 4 day even if it was true today :
buy = z and barssince(ref(su,-1))<4
or
buy = z and (ref(su,-1) or ref(su,-2) or ref(su,-3) or
ref(su,-4));
However, maybe someone else with more experience could confirm if my
logic is correct !
Hope this will help
Best !
Jon
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
<A title=traders10@xxxx
href="">traders10@xxxx
To: <A title=amibroker@xxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Sunday, September 02, 2001 4:50
PM
Subject: [amibroker] programming /logic
?
Lets say I have a set up event su = cross(x, y);
Then I look for a trigger event, z, over the next 4 days. Zis
some arbitrary complex function.Does this logic work if the
trigger occurs, for example, 3 days after the set up event? buy =
su and ( ref(z,1) or ref(z,2) or ref(z,3) or ref(z,4));Ifthis
is wrong, what approach should I be using for this
situation?TIATraderYour
use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
|