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 to Read Control Center Order Colors?

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

    How to Read Control Center Order Colors?

    Hello!

    Is there an easy way to read the various order type colors from the Control Center?
    I'm trying to dynamically update some colors in my indicator to match the color of the associated order type.

    (The attached screenshot shows the colors to which I'm referring.)

    I've been searching everywhere and can't seem to find these readily available.

    Thoughts?

    #2
    Hello MarkWise,

    Thanks for your message.

    We don't offer any documented/supported way to fetch properties of the Orders tab or the Control Center through NinjaScript.

    I will leave this thread open for any community member's input on accomplishing this task.

    If you have any other questions, please don't hesitate to open a new thread.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks for the info Jim.

      I was able to get what I needed by pulling values from the Chart Trader as shown in the code below. Hopefully others might find this helpful.


      Code:
      
      Chart chartWindow = System.Windows.Window.GetWindow(owner.ChartControl.Parent) as NinjaTrader.Gui.Chart.Chart;
      if (chartWindow != null)
      {
       ChartTrader chartTrader = Window.GetWindow(chartWindow.ActiveChartControl.Parent).FindFirst("ChartWindowChartTraderControl") as NinjaTrader.Gui.Chart.ChartTrader;
       if (chartTrader != null)
       {
      
        StopOrderLineBoxBrush = (SolidColorBrush)chartTrader.Properties.StopLoss.Brush;
      
        TargetOrderLineBoxBrush = (SolidColorBrush)chartTrader.Properties.ProfitTarget.Brush;
      
      
       }
      }

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by tradebot, Today, 01:25 PM
      0 responses
      4 views
      0 likes
      Last Post tradebot  
      Started by seq2seq, 05-07-2023, 07:26 PM
      6 responses
      563 views
      0 likes
      Last Post duniya_trader  
      Started by i2ogu3, Yesterday, 11:31 PM
      4 responses
      23 views
      0 likes
      Last Post i2ogu3
      by i2ogu3
       
      Started by reynoldsn, Yesterday, 07:11 PM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by manueldecastro, Today, 10:26 AM
      2 responses
      12 views
      0 likes
      Last Post manueldecastro  
      Working...
      X