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 snoussi, Today, 12:26 PM
    4 responses
    13 views
    0 likes
    Last Post snoussi
    by snoussi
     
    Started by Richozzy38, Today, 01:06 PM
    0 responses
    3 views
    0 likes
    Last Post Richozzy38  
    Started by reynoldsn, Today, 12:42 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by f.saeidi, Today, 12:35 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Italohispanico, Today, 12:39 PM
    0 responses
    6 views
    0 likes
    Last Post Italohispanico  
    Working...
    X