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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    50 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    69 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    36 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    97 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    60 views
    0 likes
    Last Post PaulMohn  
    Working...
    X