Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to use dictionary/list in user inputs?

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

    Is it possible to use dictionary/list in user inputs?

    for example, i have
    Code:
    		[NinjaScriptProperty]
    		[Display(Name = "Show Line1",  Order = 1, GroupName = "abc")]
    		public bool _showLine1	{ get; set; }	
    		 
    		[NinjaScriptProperty]
    		[Display(Name = "Show Line2", Order = 2, GroupName = "abc")]
    		public bool _showLine2	{ get; set; }
                    ........
                    etc, like 20-30 lines
    if something like this is possible:
    Code:
                   public Dictionary <string,bool> _Show = new Dictionary <string,bool>();
    
    		[NinjaScriptProperty]
    		[Display(Name = "Show Line1",  Order = 1, GroupName = "abc")]
    		public bool _Show["line1"] { get; set; }	
    		 
    		[NinjaScriptProperty]
    		[Display(Name = "Show Line2", Order = 2, GroupName = "abc")]
    		public bool _Show["line2"] 	{ get; set; }
    that later, in `OnStateChange` or in `OnBarUpdate` I can easily iterate within the dictionary..


    (p.s. if something like that is achievable, please add several words about how to do them with `brush` inputs, because they use serialization too of the input's variables names)

    #2
    Hello TazoTodua,

    It is possible to use a custom TypeConverter to open a collection with a collection editor.

    Below is a link to a reference sample that demonstrates.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    331 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X