How can I achieve this?
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!
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
NinjaTrader
Displaying a Non-Double Value in Databox
Collapse
X
-
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?Tags: None
-
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]);
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
-
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
-
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
-
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 adeelshahzad, Today, 11:49 AM
|
5 responses
15 views
0 likes
|
Last Post Today, 01:27 PM | ||
Started by spottysallrite, Today, 11:31 AM
|
5 responses
12 views
0 likes
|
Last Post Today, 01:20 PM | ||
Started by yaniv, Today, 12:50 PM
|
1 response
2 views
0 likes
|
Last Post Today, 01:15 PM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
10 responses
32 views
0 likes
|
Last Post Today, 01:04 PM | ||
Started by Padan, Today, 02:02 AM
|
7 responses
19 views
0 likes
|
Last Post Today, 12:59 PM |
Comment