## New version 18 available now

Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

 Indicator Color, Visuals, and MACD. Rate this Topic:
 Previous Topic · Next Topic Watch this topic · Print this topic ·
diceman
 Posted : Thursday, July 13, 2006 11:48:13 AM
Registered User
Joined: 1/28/2005
Posts: 6,049
One of the quirks of the PCF language is that true/false conditions can be made to represent 1 or zero.

If we create the custom indicator C>C4 (is the close greater than the close 4
bars ago ) we will get an error message because this condition does not have a value (it is true/false).

However if we place the true/false indicator in the ABS function we will get a
value of 1 when it is true and zero when it is false.

ABS(C>C4)=1 when true and zero when false.
------------------------------------------------------------------------------------------------------------------
We can use this to our advantage to create indicator triggers on the price chart
and have them change colors under bullish or bearish conditions. I will give a
few examples:
------------------------------------------------------------------------------------------------------------------
#1(Moving average slope up or down:)

Create the custom indicator:

ABS(XAVGC22>XAVGC22.1)*XAVGC22

Place it in top window.
Make the color green.
Select plot using price scale.
Smoothing average 1.

Create a new custom indicator:

ABS(XAVGC22<XAVGC22.1)*XAVGC22

Place it in top window.
Make the color red.
Select plot using price scale.
Smoothing average 1.

You should now see on your chart a 22expmav that turns green or red
as the average moves up or down.
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
#2 MACD Histogram trigger:

Create the custom indicator:

ABS((XAVGC12-XAVGC26)-(XAVG(XAVGC9,12)-XAVG(XAVGC26,9))>0)*(AVGL10*.98)

Place it in top window.
Make the color yellow
Select plot using price scale.
Smoothing average 1.

Create the custom indicator:

ABS((XAVGC12-XAVGC26)-(XAVG(XAVGC9,12)-XAVG(XAVGC26,9))<0)*(AVGH10*1.02)

Place it in top window.
Make the color red.
Select plot using price scale.
Smoothing average 1.

This plots a yellow line on the chart when the MACD histogram:
12,26,9 (exp) is above zero and a red line when it is below zero.

The yellow line represents a simple 10 bar average of the lows
2% lower than there calculated value.

The red line represents a simple 10 bar average of the highs
2% higher than the calculated value.

If you already have stop indicators you can insert them.

-------------------------------------------------------------------------------------------------------------

Obviously you can edit all your displays and parameters to display exactly
what you want. These are just samples to get you started.

Good Luck
Bruce_L
 Posted : Thursday, July 13, 2006 11:54:56 AM

Worden Trainer

Joined: 10/7/2004
Posts: 64,759
QUOTE (diceman)
Obviously you can edit all your displays and parameters to display exactly what you want.

Excellent post. I just want to note that a "Color Changing" Indicator can normally only be properly created if the Indicators Plot on the Price Scale (as above), the scale doesn't matter or if the Indicators can be forced into the same scale.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
diceman
 Posted : Thursday, July 13, 2006 6:28:47 PM
Registered User
Joined: 1/28/2005
Posts: 6,049
Yes Bruce.

I started this idea with a MACD histogram line that turns green and red
as it goes above and below zero.

You can anchor both indicators to the zero line but the positive and
negative side will not have the same scale. (Unless it works out that way
by luck)

Users browsing this topic
Guest-1

 Forum Jump Customer Training & Support - Ask a Trainer - TC2000 version 12/18 - Ask a Trainer - TC2000 version 7 - Ask a Trainer - StockFinder 5.0 - PCFs, EasyScan and Custom Indicators General Discussions - Stock and Market Talk - TC2000 version 12 or 18 - TC2000 version 7 - StockFinder 5.0 - RealCode for StockFinder 5.0 Tutorial Videos - TC2000 version 12 tutorial videos - TC2000 version 7 tutorial videos 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.