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

How to get name of Input series from inside OnBarUpdate ?

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

    How to get name of Input series from inside OnBarUpdate ?

    Indicator A calls indicator SMA, and uses a series named "MidPrice" as the Input to the SMA

    I want to use a Print() statement inside the SMA indicator if it's Input Series name contains "MidPrice"

    Is there a special Reflection way to get access to the Input's Properties, to get the Name of the series which is passed into the Indicator?

    Intellisense offers
    Code:
    Input.GetType()
    and that has a lot of Properties and Methods, but I don't know which one to try, and I searched the forums but could not find any examples.

    Thank you.

    #2
    Hello balltrader,

    Unfortunately, there would not be a method or property for this and using reflection would be undocumented and unsupported.

    This thread will remain open for any community members that know of and would like to share unsupported code.


    If you are trying to get different behavior based on different plots as the input series, it might be easier to just add an enum input the user can select.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Philippe56140, Today, 02:35 PM
    0 responses
    1 view
    0 likes
    Last Post Philippe56140  
    Started by 00nevest, Today, 02:27 PM
    0 responses
    1 view
    0 likes
    Last Post 00nevest  
    Started by Jonafare, 12-06-2012, 03:48 PM
    5 responses
    3,986 views
    0 likes
    Last Post rene69851  
    Started by Fitspressorest, Today, 01:38 PM
    0 responses
    2 views
    0 likes
    Last Post Fitspressorest  
    Started by Jonker, Today, 01:19 PM
    0 responses
    2 views
    0 likes
    Last Post Jonker
    by Jonker
     
    Working...
    X