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 cmtjoancolmenero, 04-25-2024, 03:58 PM
    15 responses
    68 views
    0 likes
    Last Post cmtjoancolmenero  
    Started by sgordet, Yesterday, 06:04 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by Ticks_66, Today, 09:50 AM
    0 responses
    3 views
    0 likes
    Last Post Ticks_66  
    Started by thomson, 04-29-2024, 12:00 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by Newtrader101, Yesterday, 07:36 AM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Working...
    X