Discussions
»
Product and Service Development
»
Formula Assistance
»
Macd today is higher than for the past 1 mth to a yr.
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)
|
|
|
|
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.
|
|
|
|
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)
|
|
|
|
|
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.
|
|
|
|
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)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Macd today is higher than for the past 1 mth to a yr.
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.