Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Stochastic
This topic primarily documents the syntax of the stochastic function and indicator built into the Personal Criteria Formula Language. This syntax can be used for creating the Full Stochastic (what is used by TC2000), the Fast Stochastic, the Slow Stochastic, and Williams Percent Range (%R). How to write formulas for these indicators is actually covered in specific articles about each indicator.
The Stochastic indicator built into TC2000 is a Full Stochastic, but it can be used to reproduce both a Fast Stochastic and a Slow Stochastic.
A Fast Stochastic can be reproduced using a Full Stochastic by setting the Period or %K of the Fast Stochastic to the Period setting of the Full Stochastic and setting the %K to 1. The %D setting would match that of the Fast Stochastic.
A Slow Stochastic can be reproduced using a Full Stochastic by setting the Period or %K of the Slow Stochastic to the Period setting of the Full Stochastic and setting the %K to 3. The %D setting would match that of the Slow Stochastic.
Template
Function Version (v17+)
STOC(x, y, z)
Indicator Version
STOCx.y.z
General Version (v17+)
100 * AVG((w - MIN(w, x)) / (MAX(w, x) - MIN(w, x)), y)
Where w can be any formula which returns a numeric value.
Where x is the Period of the Indicator
Where y is a the Period of an additional Simple Moving Average
Where z is the number of Bars Ago. z can also be a date in the indicator version. May 4, 2015 would be (single quotes required): '05/04/2015'
Related Topics
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 1/16/2013 Posts: 19
|
Bruce where on this would I enter the amount I want the stochasitics to be. Lets say I am making an indicator and want stochastics to be included. I would want the stochastics to be under 50 for example and another indicator over 50.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You would add a < 50 to the end to check for under 50 and a > 50 to the end to check for over 50.
Let's say you are interested in the simple stochastic 12, 3 %K being under 50, you would write it as follows.
STOC12.3 < 50
If you wanted say a 14 period Wilder's smoothed RSI to be above 50 at the same time, it would be written as follows.
STOC12.3 < 50 AND WRSI14 > 50
-Bruce Personal Criteria Formulas TC2000 Support Articles
|