I am hoping someone can help me with this,
Exploration in Metastock v9.1 using Meisel's Overbought/Oversold {Signal}
Column A
M1:=Sum(If(C>Ref(C,-1),+1,If(C<Ref(C,-1),-1,0)),10);
a:=Cross(-6,M1) OR M1=-6;
b:=Cross(M1,0) OR M1=0;
state:=If(BarsSince(a)<BarsSince(b),1,0);
state=1 AND Ref(state,-1)=0
Column B
M1:=Sum(If(C>Ref(C,-1),+1,If(C<Ref(C,-1),-1,0)),10);
a:=Cross(M1,6) OR M1=6;
b:=Cross(0,M1) OR M1=0;
state:=If(BarsSince(a)<BarsSince(b),1,0);
state=1 AND Ref(state,-1)=0
Filter
colA OR colB
The above exploration has the following problem:
1. If the indicator exceeds -6 or +6 more than once then it fails to be included in the exploration result thereafter. To be included again the indicator has to cross the zero line so that it resets itself. I think I am right on this last point!
Could someone show me how to:-
1. rewrite the code in Column A and Column B so that the exploration continues to include results where the indicator is greater than +6 and less than -6. I need the exploration to include results where the indicator is at +7, +8 etc. and -7, -8 etc..
Also, how do I:-
2. include results for the last ten days where the indicator is greater than +6 and less than -6. Even if the indicator is at +4 or -4 today, I still need it included in the results if it was >+6 or <-6 during the last ten days.
Any help will be greatly appreciated!