logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Thailander  
#1 Posted : Wednesday, August 11, 2010 5:16:24 AM(UTC)
Thailander

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 8/11/2010(UTC)
Posts: 1

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!
wabbit  
#2 Posted : Wednesday, August 11, 2010 6:47:45 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Try something along these lines:

Code:

{Column A}
sum((c>ref(c,-1))-(c<ref(c,-1)),10);

{Filter}
alert(abs(cola)>=6,10);


Check out the MS Users Manual and Equis Formula Primer for more tips.


wabbit [:D]

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.