Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple positions

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

    Multiple positions

    I have a question about multiple contracts. In the below example, I placed an order for 5 ES contracts. The order was split, 1 contract @ 1922.25 and 4 contracts @ 1922.0.

    Click image for larger version

Name:	chart.jpg
Views:	1
Size:	69.1 KB
ID:	901201

    I see that I can get the average filled price using Position.AvgPrice, but how can I get a list of the separate orders with their actual filled prices when they have been filled in different batches?

    #2
    Hello risingfire,

    Are you trying to find this with code?

    If so, you can detect the fill price of each execution.

    protected override void OnExecution(IExecution execution)
    {
    Print(execution.Price);
    }

    You can also view the executions in the performance report for the script.
    • In the Strategies tab of the Control Center right-click the instance of the strategy
    • Select Strategy Performance -> select Real-time, Historical & Real-time, or Historical depending on which trades you want to see
    • Select the Executions tab


    Are you trying to find the executions from the Control Center that are not from code?
    Click the Executions tab of the Control Center.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Are you trying to find this with code?

      If so, you can detect the fill price of each execution.

      protected override void OnExecution(IExecution execution)
      {
      Print(execution.Price);
      }
      Thank you, yes, from within code. OnExecution() looks perfect. Thanks!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      60 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      147 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      161 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      97 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      284 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X