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

Dynamic Indicator/ Strategy configuration

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

    Dynamic Indicator/ Strategy configuration

    I’ve tried searching and could not find any other support posts similar to this specific question. I have a strategy that can trade either breakouts or inside a channel.

    i want to have the configuration panel display different user settings depending on the user first selecting one or the other of these selections

    so if “breakout” is checked ( bool=true) I want it to “unhide” 2-3 additional user configuration settings that only pertain to Breakout trades.
    if “Channel” is clicked I want a different set of inputs to be offered for the user to set.

    I’m not even sure what the proper name is for the configuration panel in c# terms ( is it a form? Or some other type of UI object)?

    not knowing the proper term, I can’t effectively search c# reference libraries for this capability

    i know it’s possible bc I have seen it in custom indicators for NinjaTrader

    thx!


    #2
    you mean parameter and Gui Category in NT8. see link https://ninjatrader.com/support/forum/forum/ninjascript-educational-resources/tips/5956-creating-user-defined-input-parameters .

    [Range(1, int.MaxValue)]
    [NinjaScriptProperty]
    [Display(Name="Period", Description="Numbers of bars used for calculations", Order=1, GroupName="Parameters")]
    public int Period
    { get; set; }

    ///--------------------------------------------
    // No upper bound, lower bound of 1
    [Range(1, int.MaxValue)]

    // No lower bound, upper bound of 100
    [Range(int.MinValue, 100)]

    // No lower or upper bound
    [Range(int.MinValue, int.MaxValue)]


    [Description("Second instrument")]
    [NinjaScriptProperty]
    [Display(Name="2nd Instrument", Order=1, GroupName="Parameters")]
    public string secondInstrument
    {
    get { return secondInstrument; }
    set { secondInstrument= value; }
    }

    Check 'CategoryOrderAttribute ' in NT8 user guide.

    [Gui.CategoryOrder(stringcategory,intorder)]







    Last edited by Emma1; 06-18-2020, 06:00 PM.

    Comment


      #3
      Hello EminiTrader,

      Thanks for your post.

      Here is a link to an example indicator that demonstrates various means of manipulating the UI. the code is documented to clarify what is being demonstrated.
      These would be applicable to a strategy as well.


      Paul H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by AttiM, 02-14-2024, 05:20 PM
      12 responses
      213 views
      0 likes
      Last Post DrakeiJosh  
      Started by cre8able, 02-11-2023, 05:43 PM
      3 responses
      238 views
      0 likes
      Last Post rhubear
      by rhubear
       
      Started by frslvr, 04-11-2024, 07:26 AM
      8 responses
      117 views
      1 like
      Last Post NinjaTrader_BrandonH  
      Started by stafe, 04-15-2024, 08:34 PM
      10 responses
      47 views
      0 likes
      Last Post stafe
      by stafe
       
      Started by rocketman7, Today, 09:41 AM
      3 responses
      12 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X