Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add Indicator with Expandable Property

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

    Add Indicator with Expandable Property

    Hi,

    I am trying to add an indicator to my strategy. The indicator has an expandable property. How does one specify the input values for the expandable property inside the strategy? Any advice would be greatly appreciated. Thank you.

    #2
    Hello Zeos6,
    Thanks for your post.

    Alot of the time you just need to include that input inside your call to the indicator. For example, we'll call my custom indicator "AAA" , if I have a boolean drop down selector inside my indicator AAA's parameters, I would set that by doing something similar to the following in my strategies code.

    Code:
    else if (State == State.DataLoaded)
    {
    	AddChartIndicator(AAA(true));
    }
    If you have multiple selectable parameters you will need to make sure you are setting the correct one. For that you can use the built in intelliPrompt inside the NinjaScript editor. I am including a link to that help guide page below. intelliPrompt will let you know what order your inputs are in and the type of input.

    IntelliPrompt
    https://ninjatrader.com/support/help...elliprompt.htm

    Please let me know if you have any questions.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply Josh but this is is not answering my question. I know how to set the values of simple indicator properties.

      The issue is how to set values for an expandable property created via a class. The property will generally not have a [NinjaScriptProperty] attribute. If the attribute is added, then I get the error:

      The type or namespace name 'MyPropertyClass' could not be found (are you missing a using directive or an assembly reference?)

      How exactly does the [NinjaScriptProperty] attribute work?

      Comment


        #4
        Hello Zeos6,
        Thanks for letting me know.

        I believe the following forum post is what you are looking for. It discusses how to create user defined input parameters. The second link goes over parameter sequencing.

        https://ninjatrader.com/support/foru...ead.php?t=5782
        https://ninjatrader.com/support/foru...ead.php?t=4770

        If this is not what you are looking for please provide a sample of the code.

        Let me know if you have any questions.
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh.

          However, this does not even touch the core of my question. The question deals with Expandable properties. Specifically, with how to set the expandable property values from a strategy.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          43 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          124 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          65 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X