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 a Non-Double Value in Databox

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

    Displaying a Non-Double Value in Databox

    I've got various DataSeries that are not prices and so not of the type double. I need to debug something and would like to display some of these series in the databox so I can figure out what is going on.

    How can I achieve this?

    #2
    Hello reach4thelasers, and thank you for your question. The easiest way to populate a DataBox with this information would be to set up another dataseries for "drawing" to the DataBox, and then filling this with double representations of your data. For example, if you were keeping a series of strings, you could

    Code:
    MySeries[0] = "20.00";
    MyOutputSeries[0] = Double.Parse(MySeries[0]);
    Similarly, with integers, you could cast these values to a double.

    If you would like the DataBox to produce values other than a double, you would need to create an add-on which accomplishes this.

    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Jessica. Its actually not a numerical value that I want to display, so casting isn't going to work. Its hard to understand why Ninjatrader gives us type-rich Data-series to work with using the Series<T> Generic, but without a way to to actually view the Series.

      I think I will make an addon as I've spent 2 days stuck on a bug caused by multiple data-series getting out of sync with each other. And I think that knocking a databox together that can display them would save time.

      Is there an automation ID for the DataBoxPanel? I've inspected the databox class hierarchy and I think I know what to do.

      Incidentally is there any way to find out automation IDs for myself? I tried Snoop, but it throws an exception because it doesn't own the thread.

      Thank you!

      Kevin

      Comment


        #4
        I typically point people to the advice my colleague Jesse provides in this forums post, as far as finding automation IDs on one's own.



        Since you reported a tool not working for you, I have decided to record a short video, where I investigate the Data Box for automation IDs. This video contains several automation IDs within it.



        Regarding generic output, I recommend using the Print command, and the New -> NinjaScript Output Window. This will be much more free-form than the information in the Data Box.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Jessica!! Thanks so much for the video. Very helpful. I'm a back-end developer so a lot of the WPF/desktop stuff is new to me. I didn't know about the inspect tool or even have the Windows SDK installed.

          I am going to have a look now to see if I can do anything with the databox! I will keep you apprised.

          Thanks again!

          Kevin

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Barry Milan, Yesterday, 10:35 PM
          5 responses
          16 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          13 views
          0 likes
          Last Post DanielSanMartin  
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          13 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by terofs, Today, 04:18 PM
          0 responses
          11 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          8 views
          0 likes
          Last Post nandhumca  
          Working...
          X