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 |

Visual cue Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
pstrachocki
Posted : Thursday, January 24, 2013 2:21:51 PM
Registered User
Joined: 5/4/2006
Posts: 15

Good afternoon.

I am looking for a way to put an arrow, or a diamond or some other visual cue that occurs when an 8 period moving average crosses through a 21 period MA.  Both are exponential.  To really push my luck, I want the arrow Green going up, and red going down.

Is that something that is possible in TC 12.3?

Bruce_L
Posted : Thursday, January 24, 2013 2:38:25 PM


Worden Trainer

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

You can plot dots, but not arrows. Add two Custom PCF Indicators to the Price History Pane and choose to scale them with Price History. Set the Plot style of both Custom PCF Indicators to Dot. For the first Custom PCF Indicator, set the Color to green and use the following Formula:

XAVGC8 * ABS(XAVGC8 > XAVGC21 AND XAVGC8.1 <= XAVGC21.1)

For the second Custom PCF Indicator, set the Color to red and use the following Formula:

XAVGC8 * ABS(XAVGC8 < XAVGC21 AND XAVGC8.1 >= XAVGC21.1)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
pstrachocki
Posted : Thursday, January 24, 2013 2:53:17 PM
Registered User
Joined: 5/4/2006
Posts: 15

Thank you for the quick response

Putt4Dough
Posted : Thursday, August 6, 2015 5:11:57 PM

Registered User
Joined: 7/30/2007
Posts: 1,072

Bruce, I'm doing a little visual backtesting and was wondering ...

I'm assuming there are 500 bars of price history on a chart (haven't counted lately :) and in addition to plotting dots when two moving averages cross (above) I would like to count the number of crossovers without having to count dots myself. Is there a way to write a PCF to count the total number of crossovers?

If so, you can go ahead and use the above moving averages for your example.

Thanks!

Bruce_L
Posted : Friday, August 7, 2015 10:40:01 AM


Worden Trainer

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

You can create a Custom PCF Indicator to count the number of times a condition was true in x bars.

To do this the Formula of the Custom PCF Indicator to be able to be calculated x - 1 bars ago.

So let's say we wanted to do this for 500 bars. We would set the Period of the Custom PCF Indicator to 500 and the Average Type to Simple. Then we would use the following Formula (for EMA8 xUp EMA21).

500 * ABS(XAVGC8 > XAVGC21 AND XAVGC8.1 <= XAVGC21.1)

The 500 at the beginning of the Formula needs to match the Period of the Custom PCF Indicator.

Now I probably wouldn't use a period of 500 because the calculations of the exponential moving averages are not going to be very good early on in the series. Instead I would probably wait until about 5 times the period of the longest moving average and use 400 instead.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Putt4Dough
Posted : Friday, August 7, 2015 11:51:46 AM

Registered User
Joined: 7/30/2007
Posts: 1,072

Thanks Bruce, both for the PCF and the insight.

Bruce_L
Posted : Friday, August 7, 2015 11:57:05 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.