Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnExecutionUpdate => get value from "averageFillPrice"

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

    OnExecutionUpdate => get value from "averageFillPrice"

    hello everyone,
    how can I access the value "averageFillPrice"?​

    I have:
    Code:
    protected override void OnExecutionUpdate (Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time)
            {
                // This is the code I used to discover the Stop loss order's name
                Print("OOU: order: " + execution.Order);
    
                // Now that I know it is 'Stop loss', I can use this name here
                if (execution.Order.Name == "Stop loss")
                {
                    PriceOut = execution.Order.averageFillPrice; // 21599.25 ????
                    .............​
                }
            }
    In the executen.Order is:
    OOU: order: orderId='14e2913fdc174113a2996443a4dbeff3' account='Playback101' name='Stop loss' orderState=Filled instrument='NQ 03-25' orderAction=BuyToCover orderType='Stop Markt' limitPrice=0 stopPrice=21599.25 quantity=1 tif=Gtc oco='a8777b145c3e418eb0c88011d11e832b' filled=1 averageFillPrice=21599.25 onBehalfOf='' id=15615 time='2024-12-19 16:21:55' gtd='2099-12-01' statementDate='2024-12-19'
    Can someone please help me here
    Falke07

    #2
    Hello Falke07,

    Thank you for your post.

    Execution objects do not have an AverageFillPrice property.

    You can execution.Price to get the price the order filled at.

    Comment


      #3
      Hello Gaby,

      thank you ;-)

      Falke07

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      87 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      128 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      65 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      117 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X