Rank: Newbie
Groups: Registered, Registered Users Joined: 6/2/2011(UTC) Posts: 2
|
Hello,
I'm trying to code:
Close more than moving average 200 and close less than moving average 10 and price above 5 and average volume for 30 days above 500000 and rsi(2) is less than 1 and rsi(2) one day ago is less than 2
C > Mov(C,200,S) AND
C < Mov(C,10,S) AND
C > 5 AND
Mov(V,30,S) > 500000 AND
RSI(2)<1 AND RSI(2,-1)<2
Ive tried putting paranthesis around each one of them. But it's not working. Any help please??
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
Well, I think it would look like this:
C>Mov(C,200,S) AND C<Mov(C,10,S) AND C>5 AND Mov(V,30,S)>500000 AND RSI(2)<1 AND Ref(RSI(2),-1)<1
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 6/2/2011(UTC) Posts: 2
|
Thanks for your input john. But that does not work either. I'm a new metastock user. I entered that formula as a buy singnal for a simulation in enhanced system test.
It should work, because i have used this on other platforms. I doubled checked the dates as well. This formula gets ZERO hits.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
Something is probably off on your parameters -- the code matches your posted description; it's straightforward and easy to check/modify.
A quick Exploration on the S&P 500 got no hits.
You might try commentting out individual lines with braces "{" and "}" and re-run an Exploration, to see where the glitch is. Also, try a plot of the component indicators on a chart, hit "Zoom Reset" and page-through a few stocks to see if anything shows up.
FWIW, I removed a zero from the Volume parameter, and ran the following Exploration, which returned a few hits -- note that you can sort the Results table by clicking on the table header:
Column A: Signal ------------------ C>Mov(C,200,S) AND C<Mov(C,10,S) AND C>5 AND Mov(V,30,S)>50000 AND RSI(2)<1 AND Ref(RSI(2),-1)<2
Column B: Cum ------------------ Result:= C>Mov(C,200,S) AND C<Mov(C,10,S) AND C>5 AND Mov(V,30,S)>50000 AND RSI(2)<1 AND Ref(RSI(2),-1)<2;
Cum(Result)
|
|
|
|
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.