How do i know what the variable names are from the indicator to use in the script?
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
Printing Indicator Variables
Collapse
X
-
Printing Indicator Variables
Hello, I am trying to figure out how to know what the variable names are available from an indicator I am using. I am able to print Open/High/Close/Low but do not know what the variable names are in a streamwriter addon script I am writing.
How do i know what the variable names are from the indicator to use in the script?Tags: None
-
Hello chrismcdermut,
Thank you for your post.
Not all variables within an indicator may be accessed from other scripts - plots would generally be exposed, and other variables can be specifically programmed to be exposed. Adding the indicator to a chart and seeing what plots are available from the indicator would be helpful. If you can see the code for the indicator in the NinjaScript Editor, you can take a look at that; however, if the indicator is part of a compiled assembly you wouldn't have that option. You can also try using it in the Strategy Builder to see what information is exposed from it.
Please let us know if we may be of further assistance to you.Kate W.NinjaTrader Customer Service
-
Thank you so much for this information.
Is there a way to see what variables are exposed from the indicator?
Comment
-
By using reflection all the properties with the Display attribute can be found.
https://stackoverflow.com/questions/...iven-attribute
After that use reflection to get the value of each property.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by RoswellTrader, 09-06-2023, 03:00 PM
|
4 responses
583 views
0 likes
|
Last Post
by vaxtro1
Today, 12:21 AM
|
||
Started by tidicofx, Today, 12:02 AM
|
0 responses
3 views
0 likes
|
Last Post
by tidicofx
Today, 12:02 AM
|
||
Started by Allwest, Yesterday, 10:25 PM
|
1 response
10 views
0 likes
|
Last Post
by gaz0001
Yesterday, 10:36 PM
|
||
Started by Mindset, Yesterday, 10:31 PM
|
0 responses
10 views
0 likes
|
Last Post
by Mindset
Yesterday, 10:31 PM
|
||
Started by sevensa, 03-14-2024, 10:15 PM
|
3 responses
27 views
0 likes
|
Last Post
by sevensa
Yesterday, 10:19 PM
|
Comment