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 RookieTrader, Today, 09:37 AM
      0 responses
      4 views
      0 likes
      Last Post RookieTrader  
      Started by KennyK, 05-29-2017, 02:02 AM
      3 responses
      1,282 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by AttiM, 02-14-2024, 05:20 PM
      11 responses
      184 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by fernandobr, Today, 09:11 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by timmbbo, Today, 08:59 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X