Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

moving average of a boolean condition/formula Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jztrader
Posted : Tuesday, November 20, 2018 11:24:20 PM
Platinum Customer 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.

Bruce_L
Posted : Wednesday, November 21, 2018 6:42:57 AM


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
jztrader
Posted : Wednesday, November 21, 2018 4:28:52 PM
Platinum Customer Platinum Customer

Joined: 12/4/2016
Posts: 5

Thank you!

Bruce_L
Posted : Wednesday, November 21, 2018 4:34:52 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.