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 Jonafare, 12-06-2012, 03:48 PM
      5 responses
      3,984 views
      0 likes
      Last Post rene69851  
      Started by Fitspressorest, Today, 01:38 PM
      0 responses
      2 views
      0 likes
      Last Post Fitspressorest  
      Started by Jonker, Today, 01:19 PM
      0 responses
      2 views
      0 likes
      Last Post Jonker
      by Jonker
       
      Started by futtrader, Today, 01:16 PM
      0 responses
      7 views
      0 likes
      Last Post futtrader  
      Started by Segwin, 05-07-2018, 02:15 PM
      14 responses
      1,791 views
      0 likes
      Last Post aligator  
      Working...
      X