• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Total unrealized P&L Market Analyser or any were

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • condor
    started a topic Total unrealized P&L Market Analyser or any were

    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.

  • NinjaTrader_Jim
    replied
    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.

    Leave a comment:


  • condor
    replied
    Unfortunately, I am not C# programmer. Appreciate for any help.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    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.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by Boonfly8, Today, 07:17 AM
0 responses
5 views
0 likes
Last Post Boonfly8  
Started by liltr3d, Yesterday, 10:52 PM
1 response
8 views
0 likes
Last Post NinjaTrader_PaulH  
Started by marekflys, Yesterday, 03:07 PM
1 response
16 views
0 likes
Last Post NinjaTrader_EricB  
Started by w0lverine, Today, 03:57 AM
1 response
4 views
0 likes
Last Post NinjaTrader_ChrisSch  
Started by hundert, 02-24-2019, 07:55 AM
2 responses
43 views
0 likes
Last Post jpraema
by jpraema
 
Working...
X