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

Displaying an indicator value in databox but not on chart or panel

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

    Displaying an indicator value in databox but not on chart or panel

    I would like to have an indicator value display in the data box but not on the price chart or in a panel below the chart.

    I just want the value in the data box.

    Is that possible?

    If so what do I need to put in the code?

    #2
    I would like to know if this's possible also. If we make the plot invisible by setting a transparent color, the text in the data box will also be transparent. Hmm
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    Comment


      #3
      This would unfortunately not be a supported concept, the databox is meant to show the visible / exposed plot values only.

      One workaround idea though for you to look into might be setting the plot to an empty color.
      BertrandNinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Bertrand View Post
        This would unfortunately not be a supported concept, the databox is meant to show the visible / exposed plot values only.

        One workaround idea though for you to look into might be setting the plot to an empty color.
        I forget that the color of the plot just affects the color of the title background in Data box. So skiguy you can add a Transparent plot to your chart.
        ninZa
        NinjaTrader Ecosystem Vendor - ninZa.co

        Comment


          #5
          No, transparent plots have a special handling here - you need to use Color.Empty for this 'trick' to work.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Bertrand View Post
            No, transparent plots have a special handling here - you need to use Color.Empty for this 'trick' to work.
            It's funny Transparent color hides the plot everywhere, while Empty color makes it invisible but still shows values in Databox.

            Add(new Plot(new Pen(Color.Empty), PlotStyle.Line, "Plot Name"));
            Overlay = true;
            ninZa
            NinjaTrader Ecosystem Vendor - ninZa.co

            Comment


              #7
              There is one additional attribute needed to make this work properly i.e. if you want to make the chart display as normal.

              On the indicator you need to set Scale justification to be: Overlay

              Comment


                #8
                Originally posted by skiguy View Post
                There is one additional attribute needed to make this work properly i.e. if you want to make the chart display as normal.

                On the indicator you need to set Scale justification to be: Overlay

                Of course. This can be done via the indicator setting dialog or from code:

                In Initialize():
                ScaleJustification = ScaleJustification.Overlay;
                ninZa
                NinjaTrader Ecosystem Vendor - ninZa.co

                Comment


                  #9
                  Yes that is exactly what I need after reading the help documentation.

                  Thanks for posting the initial code. Very helpful.

                  For the benefit of others here is an example:

                  Add(new Plot(Color.Empty, PlotStyle.Bar, "High0>C1 By"));
                  ScaleJustification = ScaleJustification.Overlay;
                  Add(
                  new Plot(Color.Empty, PlotStyle.Bar, "Low<C1 By"));
                  ScaleJustification = ScaleJustification.Overlay;
                  //Add(new Plot(Color.Green, PlotStyle.Bar, "ATR Hmultiplied"));

                  Overlay =
                  true;

                  Comment


                    #10
                    You will still see the outline of the price marker.
                    If you want to hide the price marker also, please set this in Initialize():

                    PaintPriceMarkers = false;
                    However, the markers of other plots (in the same indicator) will be hidden as well. It's your choice.

                    Cheers.
                    Pi
                    ninZa
                    NinjaTrader Ecosystem Vendor - ninZa.co

                    Comment


                      #11
                      Is there any way to make this work in NT8? The brush Empty is not available and so setting the colour to Transparent or making the plot not Visible makes the value disappear from the Data Box.

                      thanks

                      Comment


                        #12
                        Originally posted by trader_rick View Post
                        Is there any way to make this work in NT8? The brush Empty is not available and so setting the colour to Transparent or making the plot not Visible makes the value disappear from the Data Box.

                        thanks
                        trader_rick, sorry for my late follow up. NinjaTrader 8 has now a special property you can toggle as needed for this behavior to materialize in indicators / strategies.

                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          Thanks I had the same problem and this helped!

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by mjairg, 07-20-2023, 11:57 PM
                          3 responses
                          213 views
                          1 like
                          Last Post PaulMohn  
                          Started by TheWhiteDragon, 01-21-2019, 12:44 PM
                          4 responses
                          544 views
                          0 likes
                          Last Post PaulMohn  
                          Started by GLFX005, Today, 03:23 AM
                          0 responses
                          3 views
                          0 likes
                          Last Post GLFX005
                          by GLFX005
                           
                          Started by XXtrader, Yesterday, 11:30 PM
                          2 responses
                          12 views
                          0 likes
                          Last Post XXtrader  
                          Started by Waxavi, Today, 02:10 AM
                          0 responses
                          7 views
                          0 likes
                          Last Post Waxavi
                          by Waxavi
                           
                          Working...
                          X