Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Invoking a chart Trader button

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

    Invoking a chart Trader button

    If I invoke a button press - such as InvokeButton("ChartTraderControlQuickBuyBidButton" ) is it possible to name the Order?
    Currently it appears to be blank.
    My method is below

    private void InvokeButton(string buttonname)// needs Automation peer element
    {
    chartWindow = Window.GetWindow(this.ChartControl.Parent) as Chart;
    Button btn = chartWindow.FindFirst(buttonname) as Button;
    ButtonAutomationPeer btnPeer = new ButtonAutomationPeer(btn);
    IInvokeProvider btnInvokeP = btnPeer.GetPattern(PatternInterface.Invoke) as System.Windows.Automation.Provider.IInvokeProvider ;
    if(btnInvokeP != null) btnInvokeP.Invoke();
    }​

    #2
    Hello Mindset,

    invoking the button is the same as left clicking it, there is no other information relayed to or from the button press.

    There is not a way to provide any extra data in that use case, you would need to use a strategy if you need to name orders with specific names.

    Comment


      #3
      I thought that might be the answer. Looks like I will have to formulate my own orders then.
      Thanks.

      Comment


        #4
        You could write an addon and monitor orders from there

        Comment


          #5
          I once tried writing an addon for PositionUpdate and got hopelessly lost.
          Ended up abandoning it and wrote the thing in my indicator where it worked just fine after 47 re writes.
          Ive downloaded some from the web and the Ecosystem even and need to grasp the concept a bit more firmly I think.

          I find with NinjaTrader there is always a nuance that you only learn once you trade real money with it and strangely it ALWAYS loses you money - painful learning curve.
          Like getting the BuyBid - seems simple but NT have written code that works whereas mine works 90% of the time which is not good enough.
          Last edited by Mindset; 04-09-2025, 01:55 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          556 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          545 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X