Gold Customer
Joined: 10/7/2004 Posts: 9
|
Hi Bruce - is there code to write a function that counts the number of days since the six day moving average of price crossed above the eighteen day moving average? I would like this column value to reset to 0 once the six day moving average went below the eighteen day. Thanks.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following:
TrueInRow(AVGC6 > AVGC18, 100)
You may want to use >= instead of just > in the formula. It should return 1 on the day of the cross and count up from there (up to a max value of 100).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Gold Customer
Joined: 10/7/2004 Posts: 9
|
Thanks Bruce! And really fast!
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|