Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Count Function for Column Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Bandselect
Posted : Friday, October 26, 2018 12:24:06 PM
Gold Customer 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.

Bruce_L
Posted : Friday, October 26, 2018 12:46:04 PM


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
Bandselect
Posted : Friday, October 26, 2018 1:20:40 PM
Gold Customer Gold Customer

Joined: 10/7/2004
Posts: 9

Thanks Bruce! And really fast!

Bruce_L
Posted : Friday, October 26, 2018 1:32:02 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

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.