• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Green OC at the top right of the chart

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

    Green OC at the top right of the chart

    Hi there,

    I need to show a green OC at the top right of the chart in my Add-On, indicating OCO is enabled - similar to NinjaTrader Chart.

    Did I overlook a property of NTWindow to show or hide this control?
    If not: I assume you have simply added a green TextBlock to NTWindow.MainMenu.
    Here's the question how do you managed to allign it to the right side?

    Thanks in advance!

    #2
    Hello ruppschtaler,

    Thanks for opening the thread.

    I do not see a straight forward way of doing this, but I am investigating further to see how this can be accomplished.

    Thanks in advance for your patience.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks for your patience ruppschtaler,

      After numerous tests involving DockPanel's, setting alignment, adding a grid with a column with a width of Star, and binding the width of the DockPanel to the window, I have not been successful in finding a way to align object to the right along an the main toolbar.

      Although I could not set a control to be right aligned in the toolbar, it is possible to add a DockPanel with a specific width and then to have items within the DockPanel align to the right of the panel.

      Code:
      MyControl.HorizontalAlignment = HorizontalAlignment.Right;
      
      DockPanel dockPanel = new DockPanel();
      dockPanel.Width = 500;
      dockPanel.HorizontalAlignment = HorizontalAlignment.Stretch;
      
      dockPanel.Children.Add(MyControl);
      DockPanel.SetDock(MyControl, Dock.Right);
      
      MainMenu.Add(dockPanel);
      Since the toolbar is governed by internal styles, I cannot provide a straight forward way to achieve the effect.

      If there is anything else I can do to assist, please let me know.
      JimNinjaTrader Customer Service

      Comment


        #4
        Hi Jim,

        Thank you so much for your help!
        I've added to your code a dynamic resize of DockPanel's Width in the NTWindow.SizeChanged event handler - works acceptable.
        Can you please open a feature request to expose the OC TextBlock visibility of NTWindow class?

        Kind regards

        Comment


          #5
          Hello ruppschtaler,

          I'm glad you found a solution with SizeChanged.

          I've created a feature request with ticket ID SFT-3138.

          As with other feature requests, we cannot present an ETA as they are fulfilled based on the development team's schedule and priorities. Upon implementation the ticket ID can be found publicly on the Release Notes page of the help guide. I'll provide a link below.

          Release Notes: https://ninjatrader.com/support/help...ease_notes.htm

          Thanks for your feedback!
          JimNinjaTrader Customer Service

          Comment


            #6
            Hello Jim,

            Could you please add a second green TextBlock 'SO' for simulated orders to the feature request SFT-3138?

            Thank you very much.

            Comment


              #7
              Hello ruppschtaler,

              No problem. I've updated this feature request.
              JimNinjaTrader Customer Service

              Comment


                #8
                What does Green OC at top right of chart mean?

                What does Green OC at top right of chart mean? Also, could you please let me know why some of my charts have it, and why some do not? Thanks.

                Comment


                  #9
                  Hello oldporkchops,

                  It represents OCO being enabled. Chart Trader must be enabled to allow order entry and turning OCO on/off for that chart.

                  Further reading on OCO on charts is publicly available here: https://ninjatrader.com/support/help...OtherocoOrders

                  Please let us know if you have any additional questions.
                  JimNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by supermht, Today, 10:13 PM
                  0 responses
                  0 views
                  0 likes
                  Last Post supermht  
                  Started by supermht, Today, 07:59 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post supermht  
                  Started by mohdhm, Today, 05:13 PM
                  1 response
                  12 views
                  0 likes
                  Last Post nkhoi
                  by nkhoi
                   
                  Started by 3lliot, Today, 05:55 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post 3lliot
                  by 3lliot
                   
                  Started by Fargo, Today, 04:57 PM
                  0 responses
                  11 views
                  0 likes
                  Last Post Fargo
                  by Fargo
                   
                  Working...
                  X