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

Accessing the "Instrument Link" from code

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

    Accessing the "Instrument Link" from code

    Given a chart window instance, is it possible to determine programmatically which Instrument/Timeframe Link option is selected? Just the colour value or a numerical equivalent value?

    I could probably work it out given the Automation IDs for the instrument/timeframe link unless there's an easier way.


    Thank you!

    Kevin

    #2
    Hello Reach4thelasers,

    Thank you for writing in.

    I have put together a sample indicator which will print to the output window the Instrument Selected as well as the time frame.

    In the sample, under OnBarUpdate the statements relating to the following two variables are what you are looking for.

    Code:
    xInstrumentSelectedMenuDropDown
    xTimeSelected
    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hey Alan, thanks for the response. I think you misunderstood me. It is the Instrument LINK I want to determine; not the instrument. The colored box on the top right of the window that makes the charts change together.... Need to know the color link or some numerical equivalent so that I can replicate an action between a chart and also its linked charts.
      Attached Files

      Comment


        #4
        Hello reach4thelasers,

        I have revised the indicator to include print statements of the instrument and interval link colors.

        Please let us know if you need further assistance.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by yertle, Today, 08:38 AM
        0 responses
        4 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by Mestor, 03-10-2023, 01:50 AM
        15 responses
        378 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by samish18, Yesterday, 08:57 AM
        10 responses
        27 views
        0 likes
        Last Post samish18  
        Started by matty89, 03-02-2020, 08:31 AM
        34 responses
        3,039 views
        1 like
        Last Post NinjaTrader_BrandonH  
        Started by kujista, Today, 05:44 AM
        3 responses
        14 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X