Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Positon

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

    Market Positon

    Hi, I need to determine the entry price and the subsequent exit price of a trade. I currently get the entry price via Position.AvgPrice, but how do I get the price I exit a trade? thanks!

    #2
    Hello pman777,

    Thank you for your post.

    You will need to use OnExecution() to pull when the order if filled and then use the IOrder object you create for the order to pull the AvgFillPrice.

    For information on OnExecution() please visit the following link: http://www.ninjatrader.com/support/h...nexecution.htm

    For information on IOrder objects please visit the following link: http://www.ninjatrader.com/support/h...nt7/iorder.htm

    Please let me know if you have any questions.

    Comment


      #3
      thank you ... which routine executes first, OnExecution() or OnOrderUpdate()?

      Comment


        #4
        sorry, meant OnPositionUpdate(), not OnOrderUpdate()

        Comment


          #5
          Hello pman777,

          Thank you for your response.

          OnExecution is always called after OnOrderUpdate() is called and the OnPositionUpdate() would be called once the position updates so after an order update.

          Please let me know if I may be of further assistance.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          627 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          359 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          562 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          567 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X