Stochastic Question - futures io
futures io



Stochastic Question


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one Fat Tails with 2 posts (7 thanks)
    2. looks_two mrcartel with 2 posts (1 thanks)
    3. looks_3 Zondor with 1 posts (2 thanks)
    4. looks_4 Big Mike with 1 posts (1 thanks)
      Best Posters
    1. looks_one Fat Tails with 3.5 thanks per post
    2. looks_two Zondor with 2 thanks per post
    3. looks_3 Big Mike with 1 thanks per post
    4. looks_4 mrcartel with 0.5 thanks per post
    1. trending_up 1,518 views
    2. thumb_up 11 thanks given
    3. group 4 followers
    1. forum 6 posts
    2. attach_file 2 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Stochastic Question

(login for full post details)
  #1 (permalink)
 mrcartel 
Baltimore, MD
 
Experience: Beginner
Platform: ninjatrader
Trading: eur/usd, oil, TF
 
Posts: 2 since Jan 2012
Thanks: 0 given, 1 received

Which is considered the fast line and slow line of the stochastics? %K or %D

Started this thread Reply With Quote
The following user says Thank You to mrcartel for this post:

Can you help answer these questions
from other members on futures io?
1 min chart v-shape scan help please
ThinkOrSwim
Experience with AGN (Introducing Broker)
Brokers
Ninjatrader 8 Indicator - Plotting lines as offset from …
NinjaTrader
TD Sequential for NT or MW?
Platforms and Indicators
Color templates for MT5 40 items
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Al Brooks Trading Course (www.brookstradingcourse.com)
29 thanks
Fail to Plan - Plan to Fail: What can go wrong?
22 thanks
Losing faith...
21 thanks
Where do you get your financial news & investment ideas?
18 thanks
Holding futures overnight
17 thanks
 
(login for full post details)
  #3 (permalink)
 Fat Tails 
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,858 since Mar 2010
Thanks: 4,238 given, 26,770 received



mrcartel View Post
Which is considered the fast line and slow line of the stochastics? %K or %D


@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.

Reply With Quote
The following 5 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #4 (permalink)
 mrcartel 
Baltimore, MD
 
Experience: Beginner
Platform: ninjatrader
Trading: eur/usd, oil, TF
 
Posts: 2 since Jan 2012
Thanks: 0 given, 1 received

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.

Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
 Fat Tails 
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,858 since Mar 2010
Thanks: 4,238 given, 26,770 received


mrcartel View Post
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.

5 is the lookback period, which is also called periodK.

2 is the smoothing parameter periodD for the %D line of the Fast Stochastics, which becomes the %K line of the Slow Stochastics.

2 is also the smoothing parameter of the %D line of the Slow Stochastics.



Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #6 (permalink)
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
 
Zondor's Avatar
 
Posts: 1,347 since Jul 2009
Thanks: 1,245 given, 2,724 received

The attached file shows how the Stochastic should be coded. Ninjatrader's version is ridiculous. Friends don't let friends use code like that.

Note the changes in Stochastics.cs
  • 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.

Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to Zondor for this post:
 
(login for full post details)
  #7 (permalink)
 Big Mike 
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
 
Big Mike's Avatar
 
Posts: 50,133 since Jun 2009
Thanks: 32,625 given, 98,800 received


Zondor View Post
The attached file shows how the Stochastic should be coded. Ninjatrader's version is ridiculous. Friends don't let friends use code like that.

Note the changes in Attachment 94780
  • 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.

You should post it in the NT8 thread, or email NT support, so they can create a ticket # for you and hopefully include it in the next major release.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/

Visit other sites? Please spread the word about your experience with our community!
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Big Mike for this post:


futures io Trading Community Platforms and Indicators > Stochastic Question


Last Updated on November 14, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts