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 NullPointStrategies, Today, 05:17 AM
      0 responses
      53 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      70 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X