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 Tim-c, Today, 02:10 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        2 views
        0 likes
        Last Post Taddypole  
        Started by chbruno, 04-24-2024, 04:10 PM
        4 responses
        50 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        10 responses
        399 views
        1 like
        Last Post beobast
        by beobast
         
        Started by lorem, Yesterday, 09:18 AM
        5 responses
        25 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X