Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        11 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Yesterday, 08:42 PM
        0 responses
        10 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Yesterday, 07:51 PM
        0 responses
        11 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,980 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Yesterday, 06:48 PM
        0 responses
        9 views
        0 likes
        Last Post rbeckmann05  
        Working...
        X