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!
See more
See less

Partner 728x90

Collapse

Total unrealized P&L Market Analyser or any were

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

    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.

    #2
    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

    Comment


      #3
      Unfortunately, I am not C# programmer. Appreciate for any help.

      Comment


        #4
        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 gemify, 11-11-2022, 11:52 AM
        6 responses
        803 views
        2 likes
        Last Post ultls
        by ultls
         
        Started by ScottWalsh, Today, 04:52 PM
        0 responses
        3 views
        0 likes
        Last Post ScottWalsh  
        Started by ScottWalsh, Today, 04:29 PM
        0 responses
        7 views
        0 likes
        Last Post ScottWalsh  
        Started by rtwave, 04-12-2024, 09:30 AM
        2 responses
        22 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by tsantospinto, 04-12-2024, 07:04 PM
        5 responses
        70 views
        0 likes
        Last Post tsantospinto  
        Working...
        X