## New version 17 available now

Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

 Stochastic Topic Rating:
 Previous Topic · Next Topic Watch this topic · Print this topic ·
Bruce_L
 Posted : Wednesday, March 15, 2017 3:25:48 PM

Worden Trainer

Joined: 10/7/2004
Posts: 61,012

# 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
spartakis
 Posted : Thursday, July 27, 2017 6:20:30 PM
Gold Customer

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.

Bruce_L
 Posted : Friday, July 28, 2017 9:55:39 AM

Worden Trainer

Joined: 10/7/2004
Posts: 61,012

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
Users browsing this topic
Guest-1

 Forum Jump Customer Training & Support - Ask a Trainer - TC2000 version 12/17 - 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 17 - 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.