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

General Question regarding PCF / Custom Indicator coding Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
dclauss
Posted : Wednesday, October 4, 2006 6:34:43 PM
Registered User
Joined: 4/28/2006
Posts: 21


Hi,

is it possible to plot indicators / PCFs that plot a value that is a result of a condition, for example:

if (c > avgc50 and c > avgc20) then plot 1
if (c > avgc50 and c < avgc20) then plot 2

Thanks in advance,

Dominik
Bruce_L
Posted : Wednesday, October 4, 2006 7:05:27 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Yes. One way to write it would be:

ABS((C > AVGC50 and C > AVGC20) * plot1 + (C > AVGC50 and C < AVGC20) * plot2)

If you place a Boolean expresion within parentheses as part of a larger Value based formula, it will return -1 if True and 0 if False.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dclauss
Posted : Wednesday, October 4, 2006 7:23:00 PM
Registered User
Joined: 4/28/2006
Posts: 21

Great!

That was what I was looking for!

Thanks!
Bruce_L
Posted : Wednesday, October 4, 2006 7:49:04 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.