Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I set the Instrument Link to a specified color programatically?

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

    How can I set the Instrument Link to a specified color programatically?

    Hi,

    On a AddOn, I would like to set the Instrument Link to a predefined color. I do not want to restore from the saved workspace. Everything else regarding the instrument propagation is working fine, I just would like to have the AddOn always open with a specified color independently of the saved workspace.

    Thank you
    jmneto

    #2
    Hello jmneto,

    Thanks for the post.

    I looked around in Visual Studio for a while but I was unable to find any interface that exposes the actual color of the Instrument Link control. All the addon has access to is the IInstrumentProvider and IIntervalProvider interfaces that are notified once the instrument or interval is changed. There is a feature request to add access to the instrument and interval link data for manipulation through NinjaScript, I will add a vote to feature SFT-3082.

    Thanks in advance for your patience.

    Comment


      #3
      Please, add my vote.
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment


        #4
        jmneto Playing around with Intellisense in the NinjaScript Editor shows that an NTTabPage has an InstrumentLinkControl and although it has a Color, it appears it's not possible to set it directly. However, the control seems to be based on a ComboBox, so setting SelectedIndex does work!

        So, for example:
        Code:
        this.InstrumentLinkControl.SelectedIndex = 3;
        // Turns the Instrument Link to Red, where "this" is the NTTabPage you want to change
        If you are happy to manage the indices of the colours yourself, it's then quite straightforward. Note that the separator is counted in the list of indices.

        Entirely unsupported, of course, so the feature request is still necessary.

        Thanks.
        Multi-Dimensional Managed Trading
        jeronymite
        NinjaTrader Ecosystem Vendor - Mizpah Software

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        650 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        577 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X