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 Radano, 06-10-2021, 01:40 AM
        19 responses
        604 views
        0 likes
        Last Post Radano
        by Radano
         
        Started by KenneGaray, Today, 03:48 AM
        0 responses
        3 views
        0 likes
        Last Post KenneGaray  
        Started by thanajo, 05-04-2021, 02:11 AM
        4 responses
        470 views
        0 likes
        Last Post tradingnasdaqprueba  
        Started by aa731, Today, 02:54 AM
        0 responses
        5 views
        0 likes
        Last Post aa731
        by aa731
         
        Started by Christopher_R, Today, 12:29 AM
        0 responses
        10 views
        0 likes
        Last Post Christopher_R  
        Working...
        X