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

Notification

Icon
Error

Options
Go to last post Go to first unread
bull&bear  
#1 Posted : Sunday, August 16, 2009 7:34:31 PM(UTC)
bull&bear

Rank: Member

Groups: Registered, Registered Users
Joined: 3/24/2008(UTC)
Posts: 22

How do I write a formula for:

1) Macd today is higher than the macd for the past 1 month to a year.

2) The number of days Macd is above the 0 line.

3)the nr of days macd is above its signal line(ma of 9 days)

johnl  
#2 Posted : Sunday, August 16, 2009 9:52:02 PM(UTC)
johnl

Rank: Advanced Member

Groups ready for retrieval: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602


How do I write a formula for:

1) Macd today is higher than the macd for the past 1 month to a year.

2) The number of days Macd is above the 0 line.

3)the nr of days macd is above its signal line(ma of 9 days)

1) macd()>HHV(macd(),30)
2) sum(If((macd()>0),1,0),30)
3) sum(If((macd()>ma(C,9,S),1,0),30)

The 30 is for the past 30 days.
Think that should do it.


wabbit  
#3 Posted : Tuesday, August 18, 2009 12:00:08 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
You have been a member since:: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
I'd start by reading the users manual and completing the free Equis formula primer exercises; also searching the forum for others who have already completed these tasks. Whilst perusing the forum, you might also come across http://forum.equis.com/forums/30031/ShowThread.aspx#30031
bull&bear  
#4 Posted : Tuesday, August 18, 2009 1:08:52 AM(UTC)
bull&bear

Rank: Member

Groups: Registered, Registered Users
Joined: 3/24/2008(UTC)
Posts: 22

THKS for help,

but,sum(If((macd()>ma(C,9,S),1,0),30) is not a valid function name when I enter this into colb or c of MS ver.9.0 for exploration.

I put : macd()>HHV(macd(),30) to explore the result is all 0,I changed to 10, then 20 ,results are still all 0 after exploring >1000 stocks, more help pls.

wblam  
#5 Posted : Tuesday, August 18, 2009 2:39:28 AM(UTC)
wblam

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/25/2006(UTC)
Posts: 79

bull&bear wrote:

THKS for help,

but,sum(If((macd()>ma(C,9,S),1,0),30) is not a valid function name ...



should be

sum(If((macd()>mov(C,9,S),1,0),30)

bull&bear wrote:
... I put : macd()>HHV(macd(),30) to explore the result is all 0 ...

macd()>HHV(macd(),30) =0 is always the case.
Try change to :

macd()=HHV(macd(),30)

or

macd()>ref(HHV(macd(),30) ,-1)

or

macd()>ref(HHV(macd(),29) ,-1)



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.