Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I place a button in the bar menu?

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

    How can I place a button in the bar menu?

    Hello.
    How can I place a button in the Bar Menu?

    Click image for larger version

Name:	EURUSD (5 Минута) 2019_04_11 (17_12_33).png
Views:	632
Size:	261.2 KB
ID:	1054096

    Thank you very much.

    #2
    Hello _Roman,

    For an example of adding a button, please see this link:


    You can also find some examples of creating custom toolbars and adding panels in the following link:

    Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've



    I look forward to being of further assistance.

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      I look forward to being of further assistance.
      Thank you. I need some time to try this metod for resolve the problem. I will definitely update you on the results of the question. Thank You so Much.

      Dear NinjaTrader_Jesse.
      I need track mouse pointer, and do some command on mouse click and double click. How can I do this? Thank you.
      How can I expand the menu with my commands by right-clicking mouse. Thank you so much.

      Comment


        #4
        Hello _Roman,

        Mouse and keyboard actions are going to be a more difficult subject depending on what you are trying to do as there are already a lot of existing mouse and keyboard actions which will get in the way. It is possible to use the Preview mouse events in some situations, however this is not a NinjaScript concept, this is a WPF C# concept. Can you detail more on what you need to do with the mouse input?

        Can you also detail what you are trying to right click on to expand a menu, is this the button you are adding or the chart? For GUI questions, you will generally need to be very specific when asking these type of questions as there are many ways to customize the GUI.


        I look forward to being of further assistance.

        Comment


          #5
          I am write same indicator to show Foot Print and Profile. To calculate Profile I need draw rectangle. I can draw rectangle from Start point, when I double click to Chart. After then, I can finish draw the Rectangle and still Rectangle on same place. Then Second point is a click on chart, the Rectangle still freeze. For this Action I need track mouse coordinates, and handle events mousemove and mouse DoubleClick and Click. Can you help me to resolve this trouble?
          Click image for larger version  Name:	EURUSD (5 Минута) 2019_04_11 (17_12_33).png Views:	1 Size:	88.6 KB ID:	1054133
          The indicator have any parametеrs. I want change setings in the floating menu(Right button mouse down), and in toolbar menu. In toolbar menu I want to do same names with command menu to change needs parameters.
          Click image for larger version  Name:	EURUSD (5 Минута) 2019_04_11 (17_12_33) 2.png Views:	1 Size:	106.1 KB ID:	1054134
          Thank You very Much.
          Last edited by _Roman; 04-11-2019, 01:29 PM.

          Comment


            #6
            Hello _Roman,

            For this use case, I would not suggest an indicator but would suggest a drawing tool as that has mouse handling built in for its anchors. You could see the existing rectangle tools code if you wanted to expand on that tool. This would be my only suggestion if you need mouse input as there is nothing documented for this type of mouse use for other types like Indicators. You can experiment with the WPF mouse and keyboard events along with handling the events, however, this is not a subject which I can assist with. You can learn more about mouse and keyboard events in relation to WPF controls by searching online for "C# WPF mouse or keyboard events".

            For the indicator parameters, I would suggest looking at the DrawingToolTile indicator for some examples of creating a floating window for parameters. You can also explore the WPF topic of using "ContextMenuOpening" to dynamically append context menu items. The ChartControl has a context menu, this is a WPF context menu so you can append items or do other actions during its opening event if you wanted. This is another subject you can research online in contrast to general C# and WPF but would not be something we have documented specifically for NinjaScript.


            I look forward to being of further assistance.

            Comment


              #7
              Good. I see that it is necessary to go the easier way for desolve this issue. I think you can close the topic. Thanks again for the answer.
              My all best wishes for you, dear Jesse.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              599 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              344 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              558 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              557 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X