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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          90 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          137 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          120 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          72 views
          0 likes
          Last Post PaulMohn  
          Working...
          X