Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Position.GetMarketPrice()

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

    Position.GetMarketPrice()

    There doesn't seem to be any documentation on this method.

    #2
    Hello,

    Position.GetMarketPrice() is in the Core namespace, rather than NinjaScript. It is one of those internally-used methods that we left exposed for developers to use if they wish, but there are several recommended alternatives that should do the job, such as Close[0], or raw data captured in OnMarketData().

    That being said, we always keep our ears open for users requesting additional documentation. Can you explain why it would be compelling to use this method over the other approaches in your scenario?
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Hi Dave,
      I was really just curious what it did as there was no documentation. My interest was sparked as I was trying to calculate the Npv of a position in the OnOrderUpdate event in a multi-symbol strategy. Unfortunately it is a bit difficult because I don't believe there is a way to tell when the event will be fired and what BarsInProgress the event is liked to so I can't pull the current price from the Closes series. When I ran into this issue is when I came across that method.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cmtjoancolmenero, Yesterday, 03:58 PM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by benmarkal, Yesterday, 12:52 PM
      3 responses
      23 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by helpwanted, Today, 03:06 AM
      1 response
      20 views
      0 likes
      Last Post sarafuenonly123  
      Started by Brevo, Today, 01:45 AM
      0 responses
      11 views
      0 likes
      Last Post Brevo
      by Brevo
       
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      244 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Working...
      X