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

Can't add indicator on StrategyAnalyzer chart manually (chart template)

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

    Can't add indicator on StrategyAnalyzer chart manually (chart template)

    Hello.

    I using my own chart template, witch works great everywhere, except StrategyAnalyzer chart.

    After applying this template, I can't add indicators on chart manually: each time I got error:
    "You cannot add/change/remove an indicator until Your prior request has completed loading historical data."


    Template in attachment.
    Is this bug? Or there are some restrictions on template parameters for StrategyAnalyzer?
    Attached Files
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Hello fx.practic,

    As a heads up, applying any chart template will cause any NinjaScript applied (such as a backtested NinjaScript Strategy) to be removed. After this, my expectation is that this would be a normal chart and would no longer show the backtest results of the backtest.
    (Any indicators applied would need to be applied by the strategy with AddChartIndicator() to see these along with the strategy backtest performance execution markers)

    That said, I am able to reproduce this behavior when testing with the SampleMACrossOver included with NinjaTrader. I've backtested, applied a saved template which removes the strategy from the chart, and then attempted to add the ADL indicator and was able to reproduce this message.

    I have reported the error to development and am awaiting further information if this is a bug or expected behavior. I appreciate your patience.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello fx.practic,

      I've received a tracking ID for this behavior.

      This behavior where applying an indicator after applying a chart template in the Strategy Analyzer and removing any running scripts results in an error is being tracked with ID #NTEIGHT-12242.

      As new versions of NinjaTrader are released, please check the release notes for this ID.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Is it still the case that indicators cannot be added to a chart where you also have a strategy applied?

        I could just add an indicator to the strategy, but it appears you can't really have something like the ATR applied in the SECONDARY panel using
        Code:
        ATR1().Panel=2
        Is there a way to display indicators in the secondary panel while having a strategy applied to a chart?

        Comment


          #5
          Hello forrestang,

          Indicators can be added to a chart with a strategy in both NinjaTrader 7 and NinjaTrader 8.

          NinjaTrader 7 cannot have a strategy and Chart Trader enabled at the same time. NinjaTrader 8 can.

          Below is a link to an example of selecting panels for indicators added with AddChartIndicator().
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            This is a weird topic, but I just found a section in the DOCS that seems to work for my application. Is this just being overlooked or soemthing, as I just added it and worked straight away and dropped an indicator in the second panel.

            Code:
                        else if (State == State.DataLoaded)
                        {                
                            T31                         = T3(Close, SlowMA, 3, 0.7);
                            ATR1                        = ATR(Close, SlowMA);
            
                            T31.Plots[0].Brush   = Brushes.DarkCyan;
                            ATR1.Plots[0].Brush  = Brushes.DarkCyan;
            
                            AddChartIndicator(T31);
                            AddChartIndicator(ATR1);
                            ChartIndicators[1].Panel = 2;
                        }
            Last edited by forrestang; 02-15-2020, 08:44 AM.

            Comment


              #7
              Hello forrestang,

              That was my mistake. I didn't address the panel selection part of your inquiry.

              ChartIndicators is indeed correct for selecting a panel.

              Example here:
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by alifarahani, 04-19-2024, 09:40 AM
              9 responses
              54 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by mmckinnm, Today, 01:34 PM
              2 responses
              5 views
              0 likes
              Last Post mmckinnm  
              Started by Conceptzx, 10-11-2022, 06:38 AM
              3 responses
              60 views
              0 likes
              Last Post NinjaTrader_SeanH  
              Started by f.saeidi, Today, 01:32 PM
              1 response
              2 views
              0 likes
              Last Post NinjaTrader_Erick  
              Started by traderqz, Today, 12:06 AM
              9 responses
              16 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X