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

Retrieve value of Instrument selected on Chart Trader window

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

    Retrieve value of Instrument selected on Chart Trader window

    Hi, I have a custom indicator that displays the tick offset from a horizonal line drawn by the user to the current market price. The horizontal line will also calculate the number of ticks in difference multiplied by the order qty in the chart trader window to display the total risk in dollar value. The problem that i am facing is my chart has 2 data series, MNQ overlay on NQ. Under the chart trader window, I have the ability to select either NQ or MNQ to enter a trade on. However, the indicator is only able to select the initial instrument selected, for eg. MNQ is by default, and when I select NQ, the indicator does not update on the fly. Not sure if there are any codes to resolve this.

    #2
    Hello marcwkm1,

    Thank you for your post.

    You can monitor the instrument selector to get the current selection when it is updated. I'm attaching a simple indicator that demonstrates how to find the Instrument Selector and subscribe to its SelectionChanged event. This will allow you to get the currently selected instrument.

    Please let us know if we may be of further assistance to you.
    Attached Files
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by terofs, Yesterday, 04:18 PM
    1 response
    21 views
    0 likes
    Last Post terofs
    by terofs
     
    Started by CommonWhale, Today, 09:55 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Gerik, Today, 09:40 AM
    2 responses
    7 views
    0 likes
    Last Post Gerik
    by Gerik
     
    Started by RookieTrader, Today, 09:37 AM
    2 responses
    12 views
    0 likes
    Last Post RookieTrader  
    Started by alifarahani, Today, 09:40 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X