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 |

Histogram for Anding 2 Moving Averages Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
traderc
Posted : Sunday, April 23, 2017 6:45:56 PM
Registered User
Joined: 10/7/2004
Posts: 86

Bruce. I have   two histograms I plot seperately - Distance price is from 21 day SMA and Distance from 50dSMA. I wanted to combine them such that I would get 1 histogram for the "Anding" of both.

So when anyone is zero the histogram is zero, When both are above zero the histogram is above zero, when both are below zero then histogram is below zero. Any other condition would make it zero.

When I tried plotting the formula below and made it a histogram it plotted positive if both wer above zero and nothing for everything else. DO I Need to make a negative histogram version and plot it on top of the poitive one?

Thnx

100 * (C / XAVGC21 - 1)>0 AND100 * 100 * (C / AVGC50 - 1)>0

Bruce_L
Posted : Monday, April 24, 2017 12:55:14 PM


Worden Trainer

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

Please try the following Indicator Formula in TC2000 v17.

100 * IIF((C > XAVGC21 AND C > AVGC50) OR (C < XAVGC21 AND C < AVGC50), C / XAVGC21 + C / AVGC50 - 2, 0)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
traderc
Posted : Monday, April 24, 2017 5:52:42 PM
Registered User
Joined: 10/7/2004
Posts: 86

Bruce thanks I have a Boolean Formula issue.

 

Bruce_L
Posted : Tuesday, April 25, 2017 9:53:06 AM


Worden Trainer

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

You need to plot this as a Custom PCF Indicator, not a Custom PCF % True Indicator because it returns a numeric value and not a Boolean result (true or false).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
traderc
Posted : Tuesday, April 25, 2017 8:22:31 PM
Registered User
Joined: 10/7/2004
Posts: 86

Duh - Thanks Bruce Should have known that :-)

Bruce_L
Posted : Wednesday, April 26, 2017 9:27:52 AM


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.