Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plots on panel below the price panel ?

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

    Plots on panel below the price panel ?

    With "AddPlot()" it's possible to plot values on the same panel as the prices. However, I would like to plot values on the panel below the price panel. Yes, this is easily done using an indicator, but I'd like to do this from within the strategy script. Is this possible? If so, how?

    #2
    Hello, thanks for writing in. You can do this in a strategy by utilizing hosted indicators and AddChartIndicator. We have a full example to reference here:


    Kind regards,

    -ChrisL
    Last edited by NinjaTrader_ChelseaB; 01-17-2023, 11:04 AM.

    Comment


      #3
      Well, your link got me to a "Page Not Found". Anyway, doesn't AddChartIndicator require an indicator ?

      Comment


        #4
        Hello spottysallrite,

        Looks like a space in the link broke the link. I've corrected it post # 2.

        AddChartIndicator() does require hosting an indicator. This will be necessary to plot in a different panel from the strategy data series panel.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Ok, so again, is it possible to plot to an "indicator" panel (ie, not the price panel, but the panel below the price panel) values generated from within a strategy?

          Comment


            #6
            Hello spottysallrite,

            Yes, absolutely. The indicator added with AddChartIndicator() adds the indicator to its own panel. The strategy sets values and the hosted indicator plots those values from the strategy.

            This is exactly what the reference sample is demonstrating.

            May I confirm you have tested the script and reviewed the code and found this to be inadequate for your needs?
            Last edited by NinjaTrader_ChelseaB; 01-17-2023, 12:10 PM.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Ok, I've implemented that code and have gotten an "indicator" plot (thanks !). At first glance, the values displayed there were as expected. Then, upon closer inspection, when comparing those values against those on the Output, I found those were not always the same. Yes, some times they were the same, but some times not. I haven't been able to discern any pattern as to when they are in sync and when they are not.

              So, do you have any suggestion as to how it could be that the values produced by the strategy would not be the same as those that are plotted? I mean, "PanelPlot[0] = Mnt_SMI;" should work, right? And that's set and printed within the same 1' ES bar. The values I see on the plot can be wildly different from those.
              Last edited by spottysallrite; 01-17-2023, 11:54 PM.

              Comment


                #8
                It's been a couple of days since I wrote the above. Do you have any comments?

                Comment


                  #9
                  Hi, thanks for the follow up. Do you see this with the example "SampleStrategyPlot"? If so please let me know a way to reproduce it (include exact chart settings). If you only see this in your custom strategy/indicator, refer back to this example we provided.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Yesterday, 05:17 AM
                  0 responses
                  56 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  132 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  73 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  45 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  49 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X