Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using ExpandableClassPropertyBrushesExample

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

    Using ExpandableClassPropertyBrushesExample

    Hi,
    I used the example script ExpandableClassPropertyBrushesExample to create a collection of input properties that starts out as collapsed. Thus the user can expand that category if needed to access them. So far so good.
    One of the properties in there is a BarsPeriod.
    Normally, changing the BarsPeriodType dropdown would instantly change the configuration of the BarsPeriod property appropriately (e.g. changing name, adding or subtracting necessary inputs (e.g. from Minute to UniRenko and back). Inside the ExpandableObjectConverter, this doesn't happen. Changing it does nothing, and the Apply button does not become available. Only when changing some other parameter will the Apply button become available and can be clicked, at which point the BarsPeriod property finally reconfigures itself.

    Do you have any advice to sort this out?

    Below is how the ExpandableObjectConverter is written.

    Thanks!
    saltminer


    [TypeConverter(typeof(ExpandableObjectConverter))]
    [RefreshProperties(RefreshProperties.All)]
    public class TimeFrameCollection
    {
    //[NinjaScriptProperty]
    [Display(Name="Enabled", Order=1)]
    public bool TimeframeEnabled
    { get; set; }

    //[NinjaScriptProperty]
    [RefreshProperties(RefreshProperties.All)]
    [Display(Name="BarsPeriod", Description="", Order=5, GroupName="TimeFrame B")]
    public NinjaTrader.Data.BarsPeriod BarsPeriod
    { get; set; }

    // .... and etc with other properties
    }



    [Display(Name = "TimeFrame B", Description = "", Order = 1000, GroupName = "TimeFrames")]
    [RefreshProperties(RefreshProperties.All)]
    [NinjaScriptProperty]
    public NinjaTrader.NinjaScript.Indicators.ATRProjections. TimeFrameCollection TimeFrameB
    { get; set; }

    #2
    Hello saltminer,

    Thank you for your post.

    It is currently not supported to nest ExpandableObjectConverter properties, including BarsPeriod, within a ExpandableObjectConverter property. You can encounter symptoms where the Apply button will still be disabled if changes are made to the nested property, as you've seen.

    That being said, I've added a vote for you to an existing feature request to support this. This request is being tracked under SFT-5079.

    As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

    Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

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