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 algospoke, Yesterday, 06:40 PM
    2 responses
    19 views
    0 likes
    Last Post algospoke  
    Started by ghoul, Today, 06:02 PM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    45 views
    0 likes
    Last Post jeronymite  
    Started by Barry Milan, Yesterday, 10:35 PM
    7 responses
    21 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by AttiM, 02-14-2024, 05:20 PM
    10 responses
    181 views
    0 likes
    Last Post jeronymite  
    Working...
    X