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

Realized PnL

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

    Realized PnL

    I would like to create code which retrieves the daily PnL for an account for all trades in that account not related to any strategy, just manual trades. The PnL which is displayed in the chart trader PnL label when flat.

    It seems to me this should easily accessible as it is displayed in chart trader but I have not found any documented or undocumented way to do this. Any pointers on how to accomplish this?

    #2
    Originally posted by seahn View Post
    I would like to create code which retrieves the daily PnL for an account for all trades in that account not related to any strategy, just manual trades. The PnL which is displayed in the chart trader PnL label when flat.

    It seems to me this should easily accessible as it is displayed in chart trader but I have not found any documented or undocumented way to do this. Any pointers on how to accomplish this?
    Hi,

    right click on the ChartTrader panel -> Chart Trader Properties...

    General

    Show Realized PnL when flat == true
    Attached Files

    Comment


      #3
      Seahn,

      Outsource is correct here.

      The Chart Trader has the option to display your realized PnL for the selected account.

      http://www.ninjatrader.com/support/h...roperties3.htm

      Let me know if I can be of further assistance.
      Cal H.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by outsource View Post
        Hi,

        right click on the ChartTrader panel -> Chart Trader Properties...

        General

        Show Realized PnL when flat == true
        Thanks for your reply but I am looking to get that number in C# code so I can use it in other calculations.

        I am looking for something like

        double pnl=RealizedPnL(string acc)

        where RealizedPnL calls some Ninja function/code to retrieve the daily Profit/Loss for the account acc.

        Comment


          #5
          Seahn,

          You would need to query the accounts to get that information. Note that this is unsupported programming with NinjaScript. However, I have attached a thread below to get you started -
          http://www.ninjatrader.com/support/f...ad.php?t=55718
          Cal H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DanielTynera, Today, 01:14 AM
          0 responses
          2 views
          0 likes
          Last Post DanielTynera  
          Started by yertle, 04-18-2024, 08:38 AM
          9 responses
          40 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by techgetgame, Yesterday, 11:42 PM
          0 responses
          12 views
          0 likes
          Last Post techgetgame  
          Started by sephichapdson, Yesterday, 11:36 PM
          0 responses
          2 views
          0 likes
          Last Post sephichapdson  
          Started by bortz, 11-06-2023, 08:04 AM
          47 responses
          1,615 views
          0 likes
          Last Post aligator  
          Working...
          X