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

Notification

Icon
Error

Options
Go to last post Go to first unread
royttm  
#1 Posted : Monday, June 27, 2011 2:10:06 AM(UTC)
royttm

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 3/27/2006(UTC)
Posts: 41
Location: Singapore

Dear All,

How do I count the number of crosses (e.g. Close crossed above 20 SMA) in the last 1 year?
I tried using SUM function but it doesn't seem to give me the correct number.

SUM(Cross(C,Mov(C,20,S)),250)

Did I used this function correctly?

- Roy
MS Support  
#2 Posted : Monday, June 27, 2011 2:08:33 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
Roy,

That formula will tell you the number of times the Close crossed above the 20 period SMA in the last 250 bars. It will not include the time the close crossed below the average.
royttm  
#3 Posted : Monday, June 27, 2011 8:24:57 PM(UTC)
royttm

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 3/27/2006(UTC)
Posts: 41
Location: Singapore

Thank you MS Support.

The function however gave me incorrect answer.
Any idea what went wrong?

- Roy

jjstein  
#4 Posted : Monday, June 27, 2011 10:35:10 PM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
You have been a member since:: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Roy -- Your formula is pretty simple and looks correct, so please give specifics, like which symbols are you testing, what are the mismatched counts, Indicator or Exploration, etc.

If you are comparing an Indicator to an Exploration, ensure the same number of bars are loaded for each.

MS Support  
#5 Posted : Wednesday, July 6, 2011 11:35:18 AM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
I've never seen Sum() count incorrectly. Please give me the formula you used, the symbol you plotted it on and the value you expected to get.

Actually, at this point, please email the above information to formulas@equis.com. They will be able to give you a faster turn around on the response
royttm  
#6 Posted : Wednesday, August 17, 2011 7:19:47 PM(UTC)
royttm

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 3/27/2006(UTC)
Posts: 41
Location: Singapore

Hi Guys,

Thanks so much for the response!
I have no idea what had happened that the function counted correctly now after I had reinstall the program. So I'll just leave it as it is.

In anyway, thank you again!
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.