Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add Property Columns programatically

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

    Add Property Columns programatically

    there is a way to conditionally remove/hide properties using

    Code:
    internal partial void ModifyProperties(PropertyDescriptorCollection col)
    {
       if (!ShowB) col.Remove(col.Find("InputB", true)); 
    }
    however, there must be a way to add properties using this way.
    What we want to achieve is to add all properties from 3rd party indiactor automatically, to the current strategy, like this (pseudo-code, which we want to do something like this):

    ( I got hint from: https://ninjatrader.com/support/foru...01&postcount=6 )


    and use this code: https://pastebin.com/raw/Nb8gTj8x

    but something fails.. (however, I think almost reaches the aim).

    any help?

    #2
    Hello TazoTodua,

    Thank you for your note.

    Attached would be a sample which demonstrates how you could conditionally change properties based on an input. For example in attached sample, whether you select Choice List Item A or B, will show different variables to be set beneath it.

    Regarding adding all properties from a third party indicator automatically, this may be possible however would be unsupported.

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

    Comment


      #3
      thanks. but the example show show to CHANGE.
      IS THERE A WAY, how to add a new property?

      my code somehow achieved adding property (but has problems with value).
      so, hoped to get example of how to add properties from other object automatically.

      Comment


        #4
        Hello TazoTodua,

        Adding a new property via another object may be possible however would be unsupported and I am unable to find any unsupported samples which demonstrate how this could be done.

        I have submitted a feature request for this in NT8.

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        132 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        74 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        117 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        112 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        89 views
        0 likes
        Last Post CarlTrading  
        Working...
        X