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

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 gm7_forum, Today, 05:51 PM
        0 responses
        2 views
        0 likes
        Last Post gm7_forum  
        Started by cre8able, Today, 03:20 PM
        1 response
        9 views
        0 likes
        Last Post cre8able  
        Started by fiddich, Today, 05:25 PM
        0 responses
        3 views
        0 likes
        Last Post fiddich
        by fiddich
         
        Started by gemify, 11-11-2022, 11:52 AM
        6 responses
        804 views
        2 likes
        Last Post ultls
        by ultls
         
        Started by ScottWalsh, Today, 04:52 PM
        0 responses
        4 views
        0 likes
        Last Post ScottWalsh  
        Working...
        X