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 AaronKoRn, Yesterday, 09:49 PM
      0 responses
      11 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      10 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      12 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,982 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Yesterday, 06:48 PM
      0 responses
      10 views
      0 likes
      Last Post rbeckmann05  
      Working...
      X