Platinum Customer
Joined: 12/4/2016 Posts: 5
|
If I wanted to create a moving aveage of a single condition or multiple conditions (below), how would I do it?
bbtop2.3>bbtop2.3.1 and bbbot2.3<bbbot2.3.1
Thank you.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The easiest way would be to add it as a Custom PCF % True Indicator.
Normally this would return 100 when true and 0 when false. But you can set a Period and Average Type in the Custom PCF % True Indicator to take a moving average of this series of 100s and 0s instead.
Another option for an "average" would be to use the CountTrue() function. The following would count the number of times this was true over the most recent 50 bars.
CountTrue(BBTOP2.3 > BBTOP2.3.1 AND BBBOT2.3 < BBBOT2.3.1, 50)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Platinum Customer
Joined: 12/4/2016 Posts: 5
|
Thank you!
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|