NexusFi: Find Your Edge


Home Menu

 





Stochastic Question


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one mrcartel with 2 posts (1 thanks)
    2. looks_two Fat Tails with 2 posts (7 thanks)
    3. looks_3 Big Mike with 1 posts (1 thanks)
    4. looks_4 Quick Summary with 1 posts (0 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 2,066 views
    2. thumb_up 11 thanks given
    3. group 4 followers
    1. forum 6 posts
    2. attach_file 2 attachments




 
Search this Thread

Stochastic Question

  #1 (permalink)
 mrcartel 
Baltimore, MD
 
Experience: Beginner
Platform: ninjatrader
Trading: eur/usd, oil, TF
Posts: 2 since Jan 2012
Thanks Given: 0
Thanks Received: 1

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

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



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
Thanked by:
  #4 (permalink)
 mrcartel 
Baltimore, MD
 
Experience: Beginner
Platform: ninjatrader
Trading: eur/usd, oil, TF
Posts: 2 since Jan 2012
Thanks Given: 0
Thanks Received: 1

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
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


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
Thanked by:
  #6 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

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 NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,443 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,603


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 the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on November 14, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts