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

What is the click handler for the chart trader Sell Ask button?

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

    What is the click handler for the chart trader Sell Ask button?

    I want to remove it and add my own click event. For example:

    Code:
    sellAskButton = chartTraderGrid.FindFirst("ChartTraderControlQuickSellAskButton") as System.Windows.Controls.Button;
    sellAskButton.Click -= DefaultNinjaSellAskButton_Click;   // I need the name of this
    sellAskButton.Click += MySellAskButton_Click;                  // My own click event which will echo some debug before it place the sell ask order

    #2
    Hello TradingRocks,

    The syntax you provided seems to be NT8 code, is this an NT8 question? If so I will move this to the correct forums. For NT7 this type of development was not supported so I am unsure if it would be possible to resubscribe the button. That would be something you can research in contrast to WindowsForms development.

    For NT8 it would not be suggested to modify any existing order button and I am unaware of a sample of re routing the event however we do have samples of adding your own custom buttons. https://ninjatrader.com/support/foru...ns?postcount=1


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Balls, yes please move, this is for NT8.

      It's possible that this hasn't been done before but this is for myself only. I only need to know the name of the click event so I can replace with my own.

      Comment


        #4
        Hello TradingRocks,

        In this case its not as simple as knowing the name of the event so you can unsubscribe from it. The easiest solution is to just append a button into the chart trader. You could place those before the existing buttons and shift the others down if you wanted to or do any other number of WPF modifications to the existing chart trader controls. If you are trying to do UI modifications I would suggest to review the samples in the linked forum as they show some best practices when working with the UI and how to access the existing controls. External WPF/Xaml development guides/tutorials will help in this area as we are using WPF for the window framework in NinjaTrader 8.

        I look forward to being of further assistance.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Ok Jesse, cheers. I will go down that route.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ghoul, Today, 06:02 PM
          2 responses
          12 views
          0 likes
          Last Post ghoul
          by ghoul
           
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          44 views
          0 likes
          Last Post jeronymite  
          Started by Barry Milan, Yesterday, 10:35 PM
          7 responses
          20 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by AttiM, 02-14-2024, 05:20 PM
          10 responses
          180 views
          0 likes
          Last Post jeronymite  
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          13 views
          0 likes
          Last Post DanielSanMartin  
          Working...
          X