Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to allow "Highest bar" to take parameters

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

    How to allow "Highest bar" to take parameters

    Hi,

    I want to create a breakout strategy using NinjaTrader 8 Strategy Builder. Basically I want to write the following condition: Go long today if today's price goes above last 10 days' high (last 10 days excluding today). For this I thought of using "Misc->Highest Bar", where I can mention the period. But then, I couldn't find an option where it can accept User Defined Inputs, because of which optimisation through Strategy Analyser is not possible. I would like to allow "Highest bar" to take parameters, so that the value of Highest bar can vary from say 1 to 100 while using Strategy Analyser. When I first asked this question at Ninjatrader 7 forum, I was told that Highest bar cannot accept User Defined Inputs in Ninjatrader 7, but that it can accept User Defined Inputs in Ninjatrader 8.

    Can you please let me know how I can allow "Highest bar" to take parameters in Strategy Builder, so that the the value of Highest bar can vary from say 1 to 100 while using Strategy Analyser

    Thanks

    #2
    Originally posted by vineeth View Post
    Hi,

    I want to create a breakout strategy using NinjaTrader 8 Strategy Builder. Basically I want to write the following condition: Go long today if today's price goes above last 10 days' high (last 10 days excluding today). For this I thought of using "Misc->Highest Bar", where I can mention the period. But then, I couldn't find an option where it can accept User Defined Inputs, because of which optimisation through Strategy Analyser is not possible. I would like to allow "Highest bar" to take parameters, so that the value of Highest bar can vary from say 1 to 100 while using Strategy Analyser. When I first asked this question at Ninjatrader 7 forum, I was told that Highest bar cannot accept User Defined Inputs in Ninjatrader 7, but that it can accept User Defined Inputs in Ninjatrader 8.

    Can you please let me know how I can allow "Highest bar" to take parameters in Strategy Builder, so that the the value of Highest bar can vary from say 1 to 100 while using Strategy Analyser

    Thanks
    Use MAX().

    Pretty much the same question as here: https://ninjatrader.com/support/foru...86&postcount=3
    Last edited by koganam; 12-31-2017, 01:48 PM.

    Comment


      #3
      Hello vineeth,

      Thank you for your note.

      Koganam provides a great solution. I wrote a strategy which uses Max and is passed a user input.

      The attached sample will draw a arrow on the last bar which was the highest bar of the user defined bars back period.

      Please let us know if you need further assistance.
      Attached Files
      Alan P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      90 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 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
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X