Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trade Execution Price

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

    Trade Execution Price

    I am developing a strategy that uses EnterLong() and EnterShort() for trade entries. What is the best event to use to capture the actual trade price? I am particularly interested in getting this to work in Strategy Analyzer.

    #2
    Hello reynoldsn,

    Thank you for your post.

    You can check the execution.Price from OnExecutionUpdate().

    Please see the Help Guide page below which has sample code.



    Please let us know if you have any further questions.

    Comment


      #3
      Thanks, Gaby,
      OnExecutionUpdate has the signature:
      Code:
      protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time)
      {
      
      
      }

      Are the parameters, execution.Price and price the same thing?

      Comment


        #4
        Hello,

        Yes, these are the same thing. You can test by printing out execution.Price and price.

        Print("execution.Price: " + execution.Price + " price: " + price);

        Please let us know if you have any further questions.

        Comment


          #5
          Ok, thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          55 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          132 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          73 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 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