• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Printing Indicator Variables

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

    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?

    #2
    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

    Comment


      #3
      Thank you so much for this information.

      Is there a way to see what variables are exposed from the indicator?

      Comment


        #4
        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 waldoalvarez, Today, 04:59 PM
        0 responses
        1 view
        0 likes
        Last Post waldoalvarez  
        Started by habibalex, Today, 09:45 AM
        2 responses
        13 views
        0 likes
        Last Post habibalex  
        Started by junkone, Today, 03:42 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by peterslane1, Today, 09:47 AM
        2 responses
        17 views
        0 likes
        Last Post aviat72
        by aviat72
         
        Started by SlickRick, Today, 02:47 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Working...
        X