Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

instrument/interval linking color

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

    instrument/interval linking color

    Can I retrieve/get the color of the color link for a chart?

    I added my own color parameter but would be nice if I can use something that already existed.

    #2
    Hello ct,

    Thank you for your note.

    If you were to use the following code in OnBarUpdate, you will see prints for both the instrument link color as well as interval link color.

    Code:
    ChartControl.Dispatcher.InvokeAsync((Action)(() =>
    {
    
    //	Below prints the Instrument Link Color (The right colored button to left of "-""Box""X"				
    xColorInstrumentLink = Window.GetWindow(ChartControl.Parent).FindFirst("ChartInstrumentLinkControlComboBox") as System.Windows.Controls.ComboBox;		
    NinjaTrader.Gui.Tools.LinkControlItem selectedInstrumentLinkItem=xColorInstrumentLink.SelectedItem as NinjaTrader.Gui.Tools.LinkControlItem;
    Print("selectedInstrumentLinkItem " + selectedInstrumentLinkItem.Text);
    								
    //	Below prints the Interval Link Color (The left colored button to left of instrument link color next to "-""Box""X"							
    xColorIntervalLink=Window.GetWindow(ChartControl.Parent).FindFirst("ChartIntervalLinkControlComboBox") as System.Windows.Controls.ComboBox;		
    NinjaTrader.Gui.Tools.LinkControlItem selectedIntervalLinkItem=xColorIntervalLink.SelectedItem as NinjaTrader.Gui.Tools.LinkControlItem;
    Print("selectedIntervalLinkItem " + selectedIntervalLinkItem.Text);
    				
    }));
    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, Yesterday, 11:51 AM
    0 responses
    16 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, Yesterday, 11:48 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    16 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    13 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 03-23-2026, 11:13 AM
    0 responses
    20 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X