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

Changing the panel for custom indicator in strategy builder

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

    Changing the panel for custom indicator in strategy builder

    I use custom indicator in my Strategy and it looks like I cannot change the panel in which plot is shown in the strategy analyzer. How can I change the panel using the code?
    Thanks,
    Sam

    #2
    Hello Sam,

    Thanks for your post.

    There is no option in the Strategy Builder that allows you to set if an indicator is drawn on the price panel or a separate panel. This would require unlocking the code from the Strategy Builder by clicking the 'Unlock code' button and manually programming this.

    With NinjaTrader 8 we introduced strategy plots which provide the ability for a strategy to render its own plots. These plots must be specific to a single panel just like indicators.

    If you need to have strategy plots on more than a single panel then please use the technique seen in the SampleStrategyPlot_NT8 reference sample in this forum thread:

    https://ninjatrader.com/support/foru...trategy?t=6651

    You can find documentation on the standard methods for plotting in the Indicator help guide section, although the documents are for indicators the plotting items are shared between indicators and strategies.

    See this help guide page for more information: http://ninjatrader.com/support/helpG...us/addplot.htm

    Let me know if I may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Hi Brandon,

      This is causing an issue for nested indicators and a couple of other cases. For example, if I add an EMA on a volume indicator, it's impossible to put the EMA in the same panel (in the strategy analyzer) of the volume indicator. Therefore the ema only appears a a long flat line in the chart panel.

      Comment


        #4
        Hello RT001,

        Thanks for your note.

        The ChartIndicators collection can be used to select the panel for the added indicator.

        See the reference sample created by my colleague Chelsea on the Forum thread linked below for how this could be accomplished.

        StrategyPlotPanelSelectExample: https://ninjatrader.com/support/foru...592#post788592

        Let me know if I may assist further.
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          Thank you. This is not working well for me. I set both indicators in the strategy to same pane. Still displayed in separate panel.
          Thanks,
          Sam

          Comment


            #6
            Hello sambathraj,

            Thanks for your note.

            The example script I linked to in post # 4 demonstrates how to select the panel for an added indicator.

            When enabling this reference sample on a chart window, you will see the SampleOverlayPlot appear on the price panel and you will see the SamplePanelPlot appear in a separate panel on the chart. See the attached screenshot.

            You could compare your indicator/strategy logic to the indicator/strategy logic in the reference sample to see where there might be differences in your script(s).

            Let me know if I may assist further.
            Attached Files
            Brandon H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by maybeimnotrader, Yesterday, 05:46 PM
            1 response
            18 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by Perr0Grande, Yesterday, 08:16 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by f.saeidi, Yesterday, 08:12 AM
            3 responses
            24 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by algospoke, Yesterday, 06:40 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by quantismo, Yesterday, 05:13 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X