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 indicator data in databox

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

    Displaying indicator data in databox

    Hallo,

    I have scripted an indicator. It's values should not be displayed in the chart
    but in the databox. To do that, I have set overlay=true, autoscale=false
    and plot color to transparent using the following syntax:

    Add(new Plot(Color.Transparent, "Plot0"));

    However, using those settings indicator values aren't displayed in the data box, although
    values are calculated properly and the indicator's name is properly displayed in the databox.

    When I choose a nontransparent plot color indi values are displayed in the databox.
    Is there a way of displaying the data in the data box without having it plotted in the chart?

    #2
    Hi Stephan, unfortunately that's not possible - only non transparent plots would be shown in the databox. You could consider using your own DrawText object for example to show the values as needed, in the sharing section there'a also a tool offered called the StatusBox, basically a custom DataBox.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Would there be a drawback to adding your plot as Black and then setting the color with PlotColors to transparent? e.g. PlotColors[x][0] = Colors.Transparent; where x is the plot index

      This seems to work for me, not sure if there are adverse side-effects.

      Addendum: This would be for non-display plots that are in the same range as your indicator, otherwise your scale will be affected.
      Last edited by OregonSun; 08-30-2011, 12:43 AM.

      Comment


        #4
        OregonSun, thanks for share of this idea, I don't see any issues with it.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by OregonSun View Post
          Would there be a drawback to adding your plot as Black and then setting the color with PlotColors to transparent? e.g. PlotColors[x][0] = Colors.Transparent; where x is the plot index

          This seems to work for me, not sure if there are adverse side-effects.

          Addendum: This would be for non-display plots that are in the same range as your indicator, otherwise your scale will be affected.
          There is a drawback when setting plot colors to transparant:
          indicator data are not displayed in the data box.

          Comment


            #6
            Stephan123,

            The plot colors are going to apply to the databox and it wouldn't be possible to have them displayed on the box but not the chart.

            Rather than displaying in the databox, you could always print these values to the Output window using Print(). Or as Bertrand suggested, you could create your own custom data box.
            MatthewNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Torontobluejays, Today, 08:43 AM
            0 responses
            1 view
            0 likes
            Last Post Torontobluejays  
            Started by sastrades, 01-31-2024, 10:19 PM
            12 responses
            186 views
            0 likes
            Last Post sastrades  
            Started by Jimmyk, 01-26-2018, 05:19 AM
            8 responses
            863 views
            0 likes
            Last Post emuns
            by emuns
             
            Started by giulyko00, 04-24-2024, 12:03 PM
            6 responses
            29 views
            0 likes
            Last Post giulyko00  
            Started by 00nevest, 04-27-2024, 02:27 PM
            3 responses
            27 views
            0 likes
            Last Post 00nevest  
            Working...
            X