Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 jaybedreamin, Today, 05:56 PM
      0 responses
      3 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      18 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      1 view
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      9 views
      0 likes
      Last Post Javierw.ok  
      Started by timmbbo, Today, 08:59 AM
      2 responses
      10 views
      0 likes
      Last Post bltdavid  
      Working...
      X