Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Total unrealized P&L Market Analyser or any were
Collapse
X
-
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, 02:37 PM.JimNinjaTrader Customer Service
-
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.JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
12 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
Comment