[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Function Wish List



PureBytes Links

Trading Reference Links

Tj,
In a ranking system that I am building, I have a need to count the 
number of times something happens within the past "X" number of 
days. For example, suppose I want to count the number of times in 
the most recent 50 days that the close was higher than the previous 
days'. The only way I can accomplish this in the current AFL is via 
multiple iif() statements, one for each day. Not difficult if only a 
couple of days of testing is needed, but cumbersome for a year of 
data!
Any suggestions? Possible example:
A count function, ie, count(condition, # of days back from end of 
data)
or count(condition, starting # back, ending # back) with ending # 
back defaulting to end of current data unless specified elsewise.

Thanks, 
Frank