Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Position.GetMarketPrice()
Collapse
X
-
Tags: None
-
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
-
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
by RookieTrader
Today, 09:37 AM
|
||
Started by KennyK, 05-29-2017, 02:02 AM
|
3 responses
1,282 views
0 likes
|
Last Post Today, 09:35 AM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
11 responses
184 views
0 likes
|
Last Post Today, 09:28 AM | ||
Started by fernandobr, Today, 09:11 AM
|
1 response
3 views
0 likes
|
Last Post Today, 09:26 AM | ||
Started by timmbbo, Today, 08:59 AM
|
1 response
3 views
0 likes
|
Last Post Today, 09:16 AM |
Comment