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