Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Returning Stochastic %K-%D as value in Market Analyzer indicator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Returning Stochastic %K-%D as value in Market Analyzer indicator

    Hi all,

    I'm interested in the stochastic value of %K-%D as a column in the Market Analyzer. However, the Stochastic Indicator only allows K or D to be returned, not the difference. Would I need to develop a custom indicator to do this? If so a sample code snippet or link to one would be appreciated.

    Thanks!

    John

    #2
    Hello John,
    Thanks for writing in and I am happy to assist you.

    Yes you have to build a new indicator to calculate the difference. A basic code snippet will be:
    Code:
    protected override void OnBarUpdate()
    {
    	Plot0.Set(Stochastics(7, 14, 3).K[0] - Stochastics(7,14,3).D[0]);  //Plot0 is the Plot data series
    }
    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      This is perfect, thank you so much!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Tim-c, Today, 02:10 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Taddypole, Today, 02:47 PM
      0 responses
      2 views
      0 likes
      Last Post Taddypole  
      Started by chbruno, 04-24-2024, 04:10 PM
      4 responses
      50 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      10 responses
      399 views
      1 like
      Last Post beobast
      by beobast
       
      Started by lorem, Yesterday, 09:18 AM
      5 responses
      23 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X