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

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 frankthearm, Today, 09:08 AM
                  5 responses
                  14 views
                  0 likes
                  Last Post NinjaTrader_Clayton  
                  Started by jeronymite, 04-12-2024, 04:26 PM
                  3 responses
                  43 views
                  0 likes
                  Last Post jeronymite  
                  Started by yertle, Today, 08:38 AM
                  5 responses
                  15 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by adeelshahzad, Today, 03:54 AM
                  3 responses
                  19 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by bill2023, Yesterday, 08:51 AM
                  6 responses
                  27 views
                  0 likes
                  Last Post NinjaTrader_Erick  
                  Working...
                  X