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 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.
    Chris L.NinjaTrader Customer Service

    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 funk10101, Today, 12:02 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by GLFX005, Today, 03:23 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by nandhumca, Yesterday, 03:41 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by The_Sec, Yesterday, 03:37 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by vecnopus, Today, 06:15 AM
        0 responses
        1 view
        0 likes
        Last Post vecnopus  
        Working...
        X