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 CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        284 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        178 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        174 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        263 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        216 views
        0 likes
        Last Post CarlTrading  
        Working...
        X