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 CaptainJack, 05-29-2026, 05:09 AM
          0 responses
          476 views
          0 likes
          Last Post CaptainJack  
          Started by CaptainJack, 05-29-2026, 12:02 AM
          0 responses
          317 views
          0 likes
          Last Post CaptainJack  
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          254 views
          1 like
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          340 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          306 views
          0 likes
          Last Post CarlTrading  
          Working...
          X