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 add buttons to the BOTTOM of Chart Trader panel -- WPF guys?

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

    How to add buttons to the BOTTOM of Chart Trader panel -- WPF guys?

    Probably Ninja won't answer this, but others??

    I have this ninjascript example from somewhere in the forum...

    ChartTraderCustomButtonsExample

    it shows how to add buttons to the Chart Trader

    to position the second custom button row it uses

    System.Windows.Controls.Grid.SetRow(lowerButtonsGr id, (chartTraderGrid.RowDefinitions.Count - 1));


    because my resting mouse position is at the bottom right of the chart, I would like to put custom buttons there, on the bottom right, for fast access, less mouse movement


    do I need to fill up the ChartTraderGrid with new, empty rows to do that, and use the last row?

    if so how to know when the grid is full (i.e. no more rows can be added?)

    or?





    #2
    well, the answer may be that I need to add a new grid to ChartTrader, and position it at the bottom???

    Comment


      #3
      Hello llanqui,

      Thanks for your post.

      You could use WPF modifications to add custom buttons to the Chart Trader window.

      We have a reference sample called SampleWPFModifications on the help guide demonstrating how to add custom buttons below the ask/bid prices on Chart Trader.

      Please see the SampleWPFModifications reference sample linked here: https://ninjatrader.com/support/help...ui)-modifi.htm
      Brandon H.NinjaTrader Customer Service

      Comment


        #4
        thank you, I have that....I would like to put the buttons on the bottom...maybe a WPF guy can tell me... thx

        Comment


          #5
          Hello llanqui,

          Thanks for your notes.

          After further research, I have found that you could modify the GridLength Height of the row so that the buttons are placed at the bottom of the chart further away from the Ask/Bid information see on Chart Trader.

          For example, in the SampleWPFModifications script you could change the GridLength Height on line 509 to a value of say 500 instead of the current value it is set to (40).

          customCtaddedRow2 = new RowDefinition() { Height = new GridLength(500) };

          Please let us know if we may assist further.
          Attached Files
          Brandon H.NinjaTrader Customer Service

          Comment


            #6
            Ok, that would be great...will try it!

            Comment


              #7
              Ok, it works....thanks

              would be so much easier with a Canvas than a Grid....for me this is difficult, transitioning to WPF from Winforms (NT7)

              I spend so much time trying to do simple things that somehow seem obscure

              I would like to have four buttons at the bottom...two rows of two buttons

              I am confounded!

              One day it will click...

              Anyone?

              Comment


                #8
                Hello llanqui,

                Thanks for your notes.

                If you want to add more buttons the the chart than the SampleWPFModifications reference sample demonstrates, I suggest studying the SampleWPFModifications reference sample to gain a full understanding of how buttons 3 and 4 are added to the lower grid on Chart Trader.

                Once you have a good understanding of how these buttons are added to the lower grid in the SampleWPFModifications script, you could try adding two more buttons to the lower grid using similar logic.

                You could also research C# WPF to learn more information by doing a Google search for something like "Multiple buttons in grid C# WPF".
                Last edited by NinjaTrader_BrandonH; 08-15-2023, 08:02 AM.
                Brandon H.NinjaTrader Customer Service

                Comment


                  #9
                  Yes, I already have that for reference

                  though, it does not add buttons at the bottom right of the chart, inside Chart Trader...

                  perhaps a WPF guy will respond

                  as I get time I'll solve this myself...was hoping for just a bit of code to know how to do it...

                  thank you

                  Comment


                    #10
                    Hello llanqui,

                    Thanks for your notes.

                    Please see this NinjaTrader Ecosystem User App Share script which demonstrates adding up to 16-18 custom buttons to Chart Trader below the Ask/Bid information.

                    Chart Trader Order Entry / Management Buttons: https://ninjatraderecosystem.com/use...uttons-v5-0-2/

                    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
                    Brandon H.NinjaTrader Customer Service

                    Comment


                      #11
                      Thank Brandon, looked at the code and yes that will allow me to do what I need... :-)

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by tradebot, Yesterday, 01:25 PM
                      3 responses
                      17 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by manueldecastro, Yesterday, 10:26 AM
                      5 responses
                      24 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by memonic, 05-01-2024, 01:23 PM
                      5 responses
                      31 views
                      0 likes
                      Last Post memonic
                      by memonic
                       
                      Started by dcriador, Yesterday, 10:45 AM
                      2 responses
                      20 views
                      0 likes
                      Last Post dcriador  
                      Started by SnailHorn, Yesterday, 10:49 PM
                      1 response
                      12 views
                      0 likes
                      Last Post SnailHorn  
                      Working...
                      X