the number of down bars for A2 can be defined using: NumDownBarsA2 = BarsSince( A2 >= Ref(A2,-1));
then you build your Buy constraint rule like: Buy = ( Cross(A1,A3) AND BarsSince(Cross(A1,A2)) <= 2 ) OR ( Cross(A1,A2) AND NumDownBarsA2 < 5 ); regards, Ed ----- Original Message ----- From: rijnaars To: [email protected] Sent: Monday, October 06, 2008 10:10 AM Subject: [amibroker] Additonal condition for Buy signal I would like to add a condition to a by signal. For instance buy = Cross(A1,A2) now i do not want this signal to be affective if A2 has been going down the last 5 days for instance. How do i add this condition?
