Registered User Joined: 2/8/2005 Posts: 16
|
Hi,
Here is the output I'm seeking: watchlist with a column that has the number of days that a 2 period moving average is above (or below) an 8 period moving average. The column would display a positive number for days above and negative number for days below. I would like to sort on the column to start with +1 or -1. Thanks!
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following.
TrueInRow(AVGC2 > AVGC8, 20) - TrueInRow(AVGC2 < AVGC8, 20)
The formula counts up to a maximum of 20 bars in a row (but you can change both instances of 20 to something else if you want). The formula uses simple moving averages, but you can use XAVG for exponential, FAVG for front weighted, or HAVG for Hull instead AVG to change the average type.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 2/8/2005 Posts: 16
|
Works great - Thank you Bruce!
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|