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 |

Market Trend Cycle PCFs? Topic Rating:
Previous Topic · Next Topic Watch this topic · Print this topic ·
accutrading
Posted : Thursday, May 12, 2005 4:27:13 AM
Registered User
Joined: 3/20/2005
Posts: 17
Any formula for "Schaff Trend Cycle" custom indicator? If not available, any other market trend cycle indicator PCFs available? Thanks!

Bruce_L
Posted : Thursday, May 12, 2005 9:30:09 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The indicator is proprietary, but, based on the various descriptions I've found, it appears to be a slightly modified Stochastic of a MACD. To write up something similar would mean finding the MIN and MAX of a MACD, which could make for a long formula (but I haven't had a chance to think about it in detail yet). Do you know the parameters you want to use?

I'll also do some research on market trend cycle indicators in general to see what I can find. In the meantime, maybe somebody else in the forums has an idea or formula that would work.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
accutrading
Posted : Thursday, May 12, 2005 3:40:29 PM
Registered User
Joined: 3/20/2005
Posts: 17
Thanks!

The params i would like to use is:

Short Period: 23
Long Period: 50
Schaff Cycle Period: 10
Level Up %: 70
Level Down %: 30

Bruce_L
Posted : Monday, May 16, 2005 8:24:26 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I have tried a variety of techniques to write a Stochastic of a MACD with your parameters, and they all create formulas too long and too slow to post as a Custom Indicator. I also have not had a lot of success determining what other indicator might make a suitable replacement. Maybe somebody else on the board has some ideas?

If you do know of another indicator to try, I'd be happy to take a look.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Tanstaafl
Posted : Wednesday, May 18, 2005 6:42:34 PM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
If Accutrading is willing to accept weekly bars as a proxy, then the MACD periods could be shortened up to about 5,10 ... this would probably make the overall PCF be more manageable length. Bruce I imagine that you know how to go about this ... the Max/Min aspect is a bear but might be acceptable with this proxy. Accutrading, what do you think of the idea?

Jim Dean

accutrading
Posted : Wednesday, June 1, 2005 3:04:50 PM
Registered User
Joined: 3/20/2005
Posts: 17
Thanks, Tanstaffl. I will look into your suggestion. I tried some other indicators too: weekly detrended price and RSI-14, either lagging or too many zero line crossing even though it can catch the big trend move. So it is inaccurate to use during consolidation or small trend period.
Bruce_L
Posted : Sunday, June 19, 2005 11:55:04 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The size problem results from the Stochastic, not the MACD. Anyway, I have come up with something producing similar graphs that is a lot shorter and faster. It is NOT the same thing. You will have to decide for yourself if it is similar enough. Essentially, it compares the current MACD to the previous MACDs during the period and sums the number of days it is above and below instead of doing a Stochastic.

Select Chart Template | Add Indicator | Indicator
-Visible: Checked
-Center Zero Line: Unchecked
-Plot Using Price Scale: Unchecked
-Smoothing Average: 5
-Smoothing Type: Exponential
-Indicator Formula:

100 * (SGN(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + SGN(XAVGC23 - XAVGC50 - XAVGC23.2 + XAVGC50.2) + SGN(XAVGC23 - XAVGC50 - XAVGC23.3 + XAVGC50.3) + SGN(XAVGC23 - XAVGC50 - XAVGC23.4 + XAVGC50.4) + SGN(XAVGC23 - XAVGC50 - XAVGC23.5 + XAVGC50.5) + SGN(XAVGC23 - XAVGC50 - XAVGC23.6 + XAVGC50.6) + SGN(XAVGC23 - XAVGC50 - XAVGC23.7 + XAVGC50.7) + SGN(XAVGC23 - XAVGC50 - XAVGC23.8 + XAVGC50.8) + SGN(XAVGC23 - XAVGC50 - XAVGC23.9 + XAVGC50.9)) / 18 + 50

You may add lines at 30 and 70 as follows:

Select Chart Template | Add Indicator | Wilder’s RSI
-Visible: Unchecked

I’m including a 10-Period Stochastic of the MACD for comparison purposes only. Just chart it on the same section of the chart to see if they match closely enough for your purposes and determine what adjustments you might wish to make when interpreting the indicator. It adds almost ten seconds to switching symbols on my system, so it isn’t something you will want to actually use (It can be simplified and sped up a bit, but I have not been able to optimize it enough to make it useful).

Select Chart Template | Add Indicator | Indicator
-Visible: Checked
-Center Zero Line: Unchecked
-Plot Using Price Scale: Unchecked
-Smoothing Average: 5
-Smoothing Type: Exponential
-Indicator Formula:

100 * (XAVGC23 - XAVGC50 - (XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) + 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 - ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4)) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) - 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 - ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4))) + XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) + 2 * (XAVGC23.7 - XAVGC50.7) - ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) + 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 - ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9)) - ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) + 2 * (XAVGC23.7 - XAVGC50.7) - ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) - 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 - ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9))) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) + 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 - ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4)) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) - 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 - ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4))) - XAVGC23.5 + XAVGC50.5 - XAVGC23.6 + XAVGC50.6 + ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7) + ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) - 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 - ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9)) + ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) + 2 * (XAVGC23.7 - XAVGC50.7) - ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) - 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 - ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9))))) / 16) / ((XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 + ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) + ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 + ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) + 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 + ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4)) + ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 + ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) + ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 + ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) - 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 + ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4))) + XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 + ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) + 2 * (XAVGC23.7 - XAVGC50.7) + ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 + ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) + 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 + ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9)) + ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 + ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) + 2 * (XAVGC23.7 - XAVGC50.7) + ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 + ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) - 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 + ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9))) + ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 + ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) + ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 + ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) + 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 + ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4)) + ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 + ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) + ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 + ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) - 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 + ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4))) - XAVGC23.5 + XAVGC50.5 - XAVGC23.6 + XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7) - ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 + ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) - 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 + ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9)) - ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 + ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) + 2 * (XAVGC23.7 - XAVGC50.7) + ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 + ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) - 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 + ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9))))) / 16 - (XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) + 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 - ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4)) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) - 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 - ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4))) + XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) + 2 * (XAVGC23.7 - XAVGC50.7) - ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) + 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 - ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9)) - ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) + 2 * (XAVGC23.7 - XAVGC50.7) - ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) - 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 - ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9))) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) + 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 - ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4)) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + 2 * (XAVGC23.2 - XAVGC50.2) - ABS(XAVGC23 - XAVGC50 + XAVGC23.1 - XAVGC50.1 - ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) - 2 * (XAVGC23.2 - XAVGC50.2)) - 2 * (XAVGC23.3 - XAVGC50.3 + XAVGC23.4 - XAVGC50.4 - ABS(XAVGC23.3 - XAVGC50.3 - XAVGC23.4 + XAVGC50.4))) - XAVGC23.5 + XAVGC50.5 - XAVGC23.6 + XAVGC50.6 + ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7) + ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) - 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 - ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9)) + ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) + 2 * (XAVGC23.7 - XAVGC50.7) - ABS(XAVGC23.5 - XAVGC50.5 + XAVGC23.6 - XAVGC50.6 - ABS(XAVGC23.5 - XAVGC50.5 - XAVGC23.6 + XAVGC50.6) - 2 * (XAVGC23.7 - XAVGC50.7)) - 2 * (XAVGC23.8 - XAVGC50.8 + XAVGC23.9 - XAVGC50.9 - ABS(XAVGC23.8 - XAVGC50.8 - XAVGC23.9 + XAVGC50.9))))) / 16)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Tanstaafl
Posted : Sunday, June 19, 2005 10:19:21 PM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Your equation, as it stands now (10:05 pm as of 6/19), appears to be a five-day exponential moving average of the 23,50 MACD's slope direction as determined by its value today compared to each of the past nine days, with an adjustment to act as an oscillator around 50%:
that is ... XAvg((E(ROC(MACD2350,N)),5) is at the the heart of it (E = summation of N=1-9 terms).

This "core" piece is SORT of like a Linear Regression slope calculation of the Sgn(MACDH 23,50,5). If that is what you intended, I can suggest a simpler formula for it if you would like.

I'm curious if anyone has an actual source printout or screen-capture of the true Schaff Trend Cycle for a few specific securities and time periods, so as to provide a direct comparison to see if this is a good model of it ... since it seems that there are at least one or two layers of assumptions as to whether the Stoc(MACD) is in fact how the Schaff really works.

One way or t'other ... nice work, Bruce!

Jim Dean

Bruce_L
Posted : Monday, June 20, 2005 9:37:43 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Everything I've found attempting to describe the indicator says it is a Stochastic of a MACD. The Stochastic is variously described as "proprietary", "modified" or "reworked". I do not know what is different and have used a normal Stochastic for comparison (meaning it should not match the proprietary version). Sources mentioning a final smoothing indicate it is half the period of the Stochastic. A final smoothing seems to have been applied on all of the charts I've seen. I have not been able to find a chart with a symbol and timeframe suitable for comparison (most of the charts seem to be from the currency markets).

I originally tried shortening the Stochastic period independent of the final smoothing period with fairly good results. I then decided to try something taking into account all of the MACD values for the period. The current form wasn't intended to be related to a Linear Regression. I wasn't trying to do anything in particular other than create a reasonable approximation of a Stochastic without having to find the Min and Max. The percentage of periods the current value was greater than or equal to the other values during the period doesn't take into account the size or timing of the changes, but seemed worth a try. I was a bit surprised at how well it worked (I was especially surprised to find it produced better approximations than the shortened Stochastics). The current form leaves out the equal part to eliminate bias towards the top.

Anyway, I welcome any simplification or optimization producing an approximation as good or better than my current suggestion. If the approximation is better, it doesn't even have to be shorter or quicker as long as the calculation time is reasonable. It would be great to have a basis of comparison to use for the actual indicator.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Tanstaafl
Posted : Monday, June 20, 2005 10:36:35 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Sounds like you have done a good job, with a paucity of info. I doubt that I can improve on it, particularly if test samples of the "original pure version" are not available. I hope that Accutrading finds your solution to be sufficient and workable.

Jim Dean

Bruce_L
Posted : Monday, June 20, 2005 3:08:18 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The following usually, but not always, results in a closer approximation:

Select Chart Template | Add Indicator | Indicator
-Visible: Checked
-Center Zero Line: Unchecked
-Plot Using Price Scale: Unchecked
-Smoothing Average: 5
-Smoothing Type: Exponential
-Indicator Formula:

450 * (XAVGC23 - XAVGC50 - AVG(XAVGC23.1,9) + AVG(XAVGC50.1,9)) / (ABS(XAVGC23 - XAVGC50 - XAVGC23.1 + XAVGC50.1) + ABS(XAVGC23 - XAVGC50 - XAVGC23.2 + XAVGC50.2) + ABS(XAVGC23 - XAVGC50 - XAVGC23.3 + XAVGC50.3) + ABS(XAVGC23 - XAVGC50 - XAVGC23.4 + XAVGC50.4) + ABS(XAVGC23 - XAVGC50 - XAVGC23.5 + XAVGC50.5) + ABS(XAVGC23 - XAVGC50 - XAVGC23.6 + XAVGC50.6) + ABS(XAVGC23 - XAVGC50 - XAVGC23.7 + XAVGC50.7) + ABS(XAVGC23 - XAVGC50 - XAVGC23.8 + XAVGC50.8) + ABS(XAVGC23 - XAVGC50 - XAVGC23.9 + XAVGC50.9)) + 50

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Snegir
Posted : Tuesday, October 30, 2007 1:43:06 PM
Registered User
Joined: 10/7/2004
Posts: 80
Base on what discussed aboive regarding Schaff Trend Cycle, I will appreciate a suggestion for a Schaff Trend Cycle PCF where Short Period: 3,
Long Period: 5, Schaff Cycle Period: 5.

Snegir
Bruce_L
Posted : Tuesday, October 30, 2007 3:55:30 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Snegir,
The full formula for an Exponentially Smoothed Stochastic of the MACD (which is as close as I can come to the descriptions I've been able to find of Schaff Trend Cycle) using your settings seems to calculate fairly quickly on my computer (I'm not sure if the Smoothing Period should be 2 or 3 - it is supposed to be half of the Schaaf Cycle Period):

Select Chart Template | Add Indicator | Indicator
- Visible: Checked
- Center Zero Line: Unchecked
- Plot Using Price Scale: Unchecked
- Smoothing Average: 3
- Smoothing Type: Exponential
- Indicator Formula: 100 * (XAVGC3 - XAVGC5 - (XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 - ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) + 2 * (XAVGC3.2 - XAVGC5.2) - ABS(XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 - ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) - 2 * (XAVGC3.2 - XAVGC5.2)) + 2 * (XAVGC3.3 - XAVGC5.3 + XAVGC3.4 - XAVGC5.4 - ABS(XAVGC3.3 - XAVGC5.3 - XAVGC3.4 + XAVGC5.4)) - ABS(XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 - ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) + 2 * (XAVGC3.2 - XAVGC5.2) - ABS(XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 - ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) - 2 * (XAVGC3.2 - XAVGC5.2)) - 2 * (XAVGC3.3 - XAVGC5.3 + XAVGC3.4 - XAVGC5.4 - ABS(XAVGC3.3 - XAVGC5.3 - XAVGC3.4 + XAVGC5.4)))) / 8) / ((XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 + ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) + 2 * (XAVGC3.2 - XAVGC5.2) + ABS(XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 + ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) - 2 * (XAVGC3.2 - XAVGC5.2)) + 2 * (XAVGC3.3 - XAVGC5.3 + XAVGC3.4 - XAVGC5.4 + ABS(XAVGC3.3 - XAVGC5.3 - XAVGC3.4 + XAVGC5.4)) + ABS(XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 + ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) + 2 * (XAVGC3.2 - XAVGC5.2) + ABS(XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 + ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) - 2 * (XAVGC3.2 - XAVGC5.2)) - 2 * (XAVGC3.3 - XAVGC5.3 + XAVGC3.4 - XAVGC5.4 + ABS(XAVGC3.3 - XAVGC5.3 - XAVGC3.4 + XAVGC5.4)))) / 8 - (XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 - ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) + 2 * (XAVGC3.2 - XAVGC5.2) - ABS(XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 - ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) - 2 * (XAVGC3.2 - XAVGC5.2)) + 2 * (XAVGC3.3 - XAVGC5.3 + XAVGC3.4 - XAVGC5.4 - ABS(XAVGC3.3 - XAVGC5.3 - XAVGC3.4 + XAVGC5.4)) - ABS(XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 - ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) + 2 * (XAVGC3.2 - XAVGC5.2) - ABS(XAVGC3 - XAVGC5 + XAVGC3.1 - XAVGC5.1 - ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) - 2 * (XAVGC3.2 - XAVGC5.2)) - 2 * (XAVGC3.3 - XAVGC5.3 + XAVGC3.4 - XAVGC5.4 - ABS(XAVGC3.3 - XAVGC5.3 - XAVGC3.4 + XAVGC5.4)))) / 8)

If this is not quick enough on your system, you may wish to try one of the following approximations instead:

Select Chart Template | Add Indicator | Indicator
- Visible: Checked
- Center Zero Line: Unchecked
- Plot Using Price Scale: Unchecked
- Smoothing Average: 3
- Smoothing Type: Exponential
- Indicator Formula: 100 * (SGN(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) + SGN(XAVGC3 - XAVGC5 - XAVGC3.2 + XAVGC5.2) + SGN(XAVGC3 - XAVGC5 - XAVGC3.3 + XAVGC5.3) + SGN(XAVGC3 - XAVGC5 - XAVGC3.4 + XAVGC5.4)) / 8 + 50

Select Chart Template | Add Indicator | Indicator
- Visible: Checked
- Center Zero Line: Unchecked
- Plot Using Price Scale: Unchecked
- Smoothing Average: 3
- Smoothing Type: Exponential
- Indicator Formula: 200 * (XAVGC3 - XAVGC5 - AVG(XAVGC3.1,4) + AVG(XAVGC5.1,4)) / (ABS(XAVGC3 - XAVGC5 - XAVGC3.1 + XAVGC5.1) + ABS(XAVGC3 - XAVGC5 - XAVGC3.2 + XAVGC5.2) + ABS(XAVGC3 - XAVGC5 - XAVGC3.3 + XAVGC5.3) + ABS(XAVGC3 - XAVGC5 - XAVGC3.4 + XAVGC5.4)) + 50

You may wish to review the following:

Plotting Custom Indicators with Examples
Understanding MACD
Understanding Stochastics
Min Max PCFs
Handy PCF example formulas to help you learn the syntax of PCFs!
PCF Formula Descriptions

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
the fox
Posted : Tuesday, January 19, 2010 11:48:48 AM
Registered User
Joined: 2/13/2009
Posts: 3
Thanks
Bruce_L
Posted : Tuesday, January 19, 2010 11:59:17 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
the fox,
You're welcome. Our pleasure.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Terminator
Posted : Wednesday, January 20, 2010 4:02:05 PM
Platinum Customer Platinum Customer

Joined: 1/5/2005
Posts: 4
Bruce and others,

Bruce, first I want to thank you for your effort in tackling many of our requests. 

Does anyone have feedback on the effectiveness or profitability of the "Schaff-like Trend Indicator" that Bruce has provided?  Also, does anyone have any tips or accompanying indicators they use with the STC; I generally use ADX to confirm trend changes but I want to find out what others use also.

thanks,
Michael
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.