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 for each Instrument

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

    Realized PnL for each Instrument

    Hi ,

    i am writing a strategy which is monitoring the NETPOS, QTY, UNREALIZED and REALIZED_PnL for all traded instruments.

    the Unrealized_PnL i get for each position:

    position.Instrument.MasterInstrument.RoundToTickSi ze(position.GetUnrealizedProfitLoss(myPerformanceU nit));

    my big question is, how to get the REALIZED_PnL for each Instrument?

    thx
    Aylin
    NinjaTrader Ecosystem Vendor - RealTime Trading Global

    #2
    Hello Aylin,
    Thanks for your post.

    I see that you have inquired on this previously with my other colleagues and have attempted to accomplish this by looping through executions. Could you clarify on what you have accomplished thus far and what you still need to accomplish?

    I look forward to your reply.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh
      as i mention we need samlpe code for NinjaTrader 8 to get Realized_PNL for each instrument.

      Unrealized works fine but do not have any idea how to get reallized PnL

      thx
      Aylin
      NinjaTrader Ecosystem Vendor - RealTime Trading Global

      Comment


        #4
        Hello Aylin,
        Thanks for your note.

        At this time there are no supported ways to get instrument specific PnL. I am submitting this as a feature request to our development team for consideration in future releases of the platform. I will report back with a tracking number for your request as soon as one is created. I am leaving this forum post open if any other users would like to comment on this.

        Please let me know if you have any further questions.
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          ok i did it now with an execution list

          double r = Cbi.SystemPerformance.Calculate(EX_FILTER).AllTrad es.TradesPerformance.Currency.CumProfit;


          :-)
          Aylin
          NinjaTrader Ecosystem Vendor - RealTime Trading Global

          Comment


            #6
            I am happy to hear that you were able to get the values you were looking for.

            I have gotten the tracking number for your feature request regarding a NinjaScript method that gets this value directly. The tracking number is SFT-3044.Please reference that number if you have any questions.
            Josh G.NinjaTrader Customer Service

            Comment


              #7
              Has this been added yet? I would also like the ability to get the realized and unrealized profit by instrument. (for addon)

              Comment


                #8
                Hello trader252,

                Thank you for your post.

                There is no current update on this request; it has not yet been implemented.

                I have added a vote for you to this request; if it is implemented in a future release you can find it under SFT-3044 in the release notes.

                Please let us know if we may be of further assistance to you.
                Kate W.NinjaTrader Customer Service

                Comment


                  #9
                  Please add my vote for SFT-3044.

                  Comment


                    #10
                    Hello caveat_lector,

                    Thank you for your reply.

                    I've added a vote for you to SFT-3044 as well.

                    Please let us know if we may be of further assistance to you.
                    Kate W.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by sidlercom80, 10-28-2023, 08:49 AM
                    166 responses
                    2,234 views
                    0 likes
                    Last Post sidlercom80  
                    Started by thread, Yesterday, 11:58 PM
                    0 responses
                    1 view
                    0 likes
                    Last Post thread
                    by thread
                     
                    Started by jclose, Yesterday, 09:37 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post jclose
                    by jclose
                     
                    Started by WeyldFalcon, 08-07-2020, 06:13 AM
                    10 responses
                    1,414 views
                    0 likes
                    Last Post Traderontheroad  
                    Started by firefoxforum12, Yesterday, 08:53 PM
                    0 responses
                    11 views
                    0 likes
                    Last Post firefoxforum12  
                    Working...
                    X