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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          79 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          40 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          63 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          63 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X