Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Total unrealized P&L Market Analyser or any were
Collapse
X
-
If you would like to hire a consultant to write this code for you, I can have a member of our Business Development team reach out to you with a list of NinjaScript Consultants who would be happy to do so.
If that is the case, please write in to platformsupport[at]ninjatrader[dot]com with the text "Attention Jim" and the thread URL.
-
Hello condor,
Thanks for opening the thread.
Outside the context of a strategy, if you would like to get the Account's Unrealized PnL, you can subscribe to AccountItemUpdate.
If you would like to get information about positions of an Account, including the Unrealized PnL, you will want to subscribe to PositionUpdate.
AccountItemUpdate - https://ninjatrader.com/support/help...itemupdate.htm
PositionUpdate - https://ninjatrader.com/support/help...tionupdate.htm
Sample code is included in the help documentation. If you want to reference a complete working example, I would advise to look for the relevant sections in the Sample AddOn Framework example. You can find the relevant code in the AddOn by searching for "AccountItemUpdate" and "PositionUpdate."
The AddOnFramework example can be found here: https://ninjatrader.com/support/help...t_overview.htm
For placing in the Market Analyzer, you can create an indicator that does these calculations and places the values in a Plot, or you can create a Market Analyzer Column and have it update the CurrentValue for that column.
The included Market Analyzer columns in NinjaTrader 8 contain source code that you can reference, as well.
Please let me know if I may be of further assistance.Last edited by NinjaTrader_Jim; 07-21-2017, 01:37 PM.
Leave a comment:
-
Total unrealized P&L Market Analyser or any were
How to make visible total unrealized P&L on total account position with different instruments? Any suggestion welcome.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ttodua, 12-06-2019, 11:40 PM
|
1 response
12 views
0 likes
|
Last Post
|
||
Started by HiddenPhilosopher, Today, 06:45 AM
|
1 response
10 views
0 likes
|
Last Post
|
||
Started by PG7940, Today, 04:26 AM
|
1 response
13 views
0 likes
|
Last Post
|
||
Started by Sh00tHerMcGavin, Yesterday, 07:39 PM
|
1 response
10 views
0 likes
|
Last Post
|
||
Started by dltharpe, Today, 09:17 AM
|
0 responses
7 views
0 likes
|
Last Post
![]()
by dltharpe
Today, 09:17 AM
|
Leave a comment: