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 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:	548
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.
    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        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.
            JesseNinjaTrader Customer Service

            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 funk10101, Yesterday, 09:43 PM
              1 response
              13 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by TheWhiteDragon, 01-21-2019, 12:44 PM
              5 responses
              551 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by rtwave, 04-12-2024, 09:30 AM
              5 responses
              37 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by funk10101, Today, 12:02 AM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by GLFX005, Today, 03:23 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Erick  
              Working...
              X