Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help setting up a Stochastic strategy

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

    Help setting up a Stochastic strategy

    Hi could someone help me figure out how to incorporate the D% value into a strategy. The idea is if the previous bar close is under or over a certain D% value the strategy will enter a long or short. I'm still learning how the ninjatrader strategy builder works, any help would be greatly appreciated.

    #2
    Hello Prestonf,

    Thanks for your post.

    To clarify, are you wanting to access the 'D' plot of the Stochastics indicator in a custom NinjaScript strategy?

    If so, you could open a New > Strategy Builder window, navigate to the Conditions and Actions screen, and set up a condition that checks if the previous Close price (Price folder > Close > Bars ago property > 1) is Greater/Less than the 'D' plot of the Stochastics indicator (Indicator folder > Stochastics > 'Value plot' drop-down property > 'D').

    After setting up the condition you could click the 'View code' button to see the generated code in a NinjaScript Editor window.

    Strategy Builder Conditions: https://ninjatrader.com/support/help...on_builder.htm
    Strategy Builder Actions: https://ninjatrader.com/support/help...t8/actions.htm

    Please let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hey Brandon thanks for the reply. Where do I input the D value? Like say I want to take a short if on the previous bar the D value closes over 85 I want to open a position on the next candles open. Thanks

      Comment


        #4
        Hello Prestonf,

        Thanks for your note.

        Setting the 'Value plot' parameter of the Stochastic indicator to 'D' would mean the D plot is being referenced for your condition. (Indicator folder > Stochastics > 'Value plot' drop-down property > 'D').

        See the attached image demonstrating this.

        And, see this help guide page for more information about the Stochastics indicator: https://ninjatrader.com/support/help...tochastics.htm

        Please let me know if you have further questions on this.
        Attached Files
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Thanks for that, working now

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          93 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          138 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          123 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          73 views
          0 likes
          Last Post PaulMohn  
          Working...
          X