| Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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?
|
|

 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
|
|
Registered User Joined: 5/4/2006 Posts: 15
|
Thank you for the quick response
|
|
 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!
|
|

 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
|
|
 Registered User Joined: 7/30/2007 Posts: 1,072
|
Thanks Bruce, both for the PCF and the insight.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
|
Guest-1 |