Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Set IsAutoScale from AddOn

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

    Set IsAutoScale from AddOn

    I'm trying to set the IsAutoScale property for all existing indicators of a chart, as well as for its data series. However, an exception is thrown whenever IsAutoScale is modified, saying "IsAutoScale cannot be set from this state."
    I tried calling SetState(SetDefaults) on the indicator, but the state remains the same (Realtime).

    Is there a way to accomplish the above from an AddOn?

    #2
    Hello aa1922,

    The IsAutoScale property needs to be set in State.SetDefaults or State.Configure so that would not be something which can be controlled dynamically later after the item is loaded.

    Comment


      #3
      Hi NinjaTrader_Jesse,

      That's what I thought - thanks for confirming! One workaround I found is to clone all indicators, which allows me to set IsAutoScale. I then remove the original objects form the chart and add the clones instead. It seems to work fine, but are there any possible issues with this approach?

      Comment


        #4
        Hello aa1922,

        That would be outside of what is supported so I would not be certain if that would work.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        42 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        29 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        46 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Working...
        X