Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
@mrcartel: For the Stochastics, I first suggest to have a look at the articles by
- Thom Hartle: Stochastics, Stocks & Commodities V. 9:3(103-105) - this article explains the formula
- George C. Lane: Lane's Stochastics, Stocks & Commodities V. 2:3(87-90) - this articles is by the creator
Fast Stochastics
Fast Line
The fast line is called %K. It shows were the current close is located in relation to the highest high and the lowest low of the lookback period n.
%K = raw value = 100 * (current close - lowest low[n]) / (highest high[n] - lowest low[n])
The default value used for the lookback period is n = 14.
Slow Line
The slow line is called %D. The slow line is obtained by smoothing the fast line with a simple moving average. The default value used for the smoothing is smooth = 3.
Stochastics or Slow Stochastics
Fast Line
The fast line of the Slow Stochastics is called %K. It is identical with the slow line of the Fast Stochastics.
Slow Line
The slow line of the Slow Stochastics is called %D. The slow line is obtained by further smoothing the fast line with a simple moving average. The default value used for the smoothing is smooth = 7.
People are sometimes confused, because there is a Fast and a Slow Stochastics. The slow line of the Slow Stochastics is in fact obtained by smoothing the raw value of the Fast Stochastics twice.
Ok...Something I'm reading is stating the stochastic is stating - The values are 5, 2, 2; overbought is 60 and oversold in 35. Midpoint is 48. Additionally, I am only interested in the K line (slow line), not the D line (fast line).
This is where I was confused at. I'm assuming %K = 5, %D = 2, and smoothing = 2.
In OnStartUp, reusable instances of the MAX, MIN, and SMA classes are created. (I cheated, used EMA instead of SMA)
The instances of MIN and MAX are only called once per bar (FirstTickOfBar).
The Compare operation was replaced with a simple absolute value inequality.
FastK is rounded to two decimal places, which is plenty. For calculating %K it should be cheaper to calculate the EMA of a series of numbers with two decimal places than the EMA of a series of numbers with ten digits which are mostly way beyond the real useful precision of that number anyway. Ditto for rounding of %K to get to %D.