Rank: Newbie
Groups: Registered, Registered Users Joined: 3/15/2013(UTC) Posts: 3
|
Is there such thing as a counter or a way to count the number of ocurrences that a condition has been "true" over last 10 days ... for example can I say "if the MACD been above zero at least 7 of last 10 days then proceed to blah blah blah.... Its not the exact syntax I am after, just can I use this logic in MS? If so which function(s) would do this for me? Thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
You have to breakdown your request into parts, then you will see the correct way to code!
Sum(MACD()>0,10) {will give the number of days that the MACD was above 0 in the past 10 days}
Now you have to use the if function to get a if,then result
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 3/15/2013(UTC) Posts: 3
|
That was the ticket. Thank you very much!
|
|
|
|
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.