Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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
|
|
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
|
|
Gold Customer
Joined: 4/18/2012 Posts: 11
|
Thanks sir
|
|
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
|
|
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
|
|
Guest-1 |