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 days above a moving average Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
donaldspinks
Posted : Wednesday, January 30, 2019 11:59:51 AM
Gold Customer Gold Customer

Joined: 4/18/2012
Posts: 11

Is there a way to create an indicator to count the days that a price closes above a moving average?

Thanks

Donald

 

Bruce_L
Posted : Wednesday, January 30, 2019 12:04:33 PM


Worden Trainer

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

You could use something like the following as the Formula setting in a Custom PCF Indicator.

TrueInRow(C > AVGC20, 50)

That formula is for a 20 period simple moving average and would max out at 50 bars, but you can change both periods in the formula if desired.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
donaldspinks
Posted : Wednesday, January 30, 2019 12:21:25 PM
Gold Customer Gold Customer

Joined: 4/18/2012
Posts: 11

Thanks sir

donaldspinks
Posted : Wednesday, January 30, 2019 2:56:37 PM
Gold Customer Gold Customer

Joined: 4/18/2012
Posts: 11

 worded that incorrectly, sorry. I wanted to know how many days a moving average is above another moving average, as in how many days has the 20 EMA been above the 50 EMA.

Thanks

 

 

Bruce_L
Posted : Wednesday, January 30, 2019 2:59:33 PM


Worden Trainer

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

Just replace the C and AVGC20 with the desired moving averages (so XAVGC20 and XAVGC50 in this case).

TrueInRow(XAVGC20 > XAVGC50, 60)



-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.