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

NET P&L

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

    NET P&L

    is there a way to access the current day's net P&L in $'s?

    #2
    Hello pman777,
    Thanks for your post.

    Are you trying to get the P&L for the account or for the strategy?
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      for a strategy

      Comment


        #4
        I do not think you can access this from the Builder currently.

        Comment


          #5
          You would use SystemPerformance.AllTrades.TradesPerformance.NetP rofit in an unlocked strategy.



          Trader17 is correct that this is not available in the Strategy Builder.
          Josh G.NinjaTrader Customer Service

          Comment


            #6
            thank you Josh ,,, how would you get the same info for an account too?

            Comment


              #7
              Originally posted by NinjaTrader_JoshG View Post
              You would use SystemPerformance.AllTrades.TradesPerformance.NetP rofit in an unlocked strategy.

              https://ninjatrader.com/support/help...?netprofit.htm

              Trader17 is correct that this is not available in the Strategy Builder.
              And could you use this in an unlocked Strategy to stop any or all strategies for the day if we reach net profit/loss for the day? Would be a great feature to have this in Strategy Builder. Like stop trading after X amount of profit/loss for the day!!
              Thanks.

              Comment


                #8
                You could do this for an account using the Account class but not with a simple method. You would need to loop through all of the trades and find the ones that are related to your strategy. Then do some math to find the net profit.
                https://ninjatrader.com/support/help...ount_class.htm

                There are some samples of daily stop losses at the following link: https://ninjatrader.com/support/foru...limit-examples
                Last edited by NinjaTrader_JoshG; 10-23-2018, 12:04 PM.
                Josh G.NinjaTrader Customer Service

                Comment


                  #9
                  Thank you. And do you have similar ones for total profit too? Maybe a future enhancement for Builder to stop trading after X in profit/loss?
                  Thank you much.

                  Comment


                    #10
                    I do not have a sample for total profit. You could modify the daily loss to also be a daily profit though.
                    Maybe a future enhancement for Builder to stop trading after X in profit/loss
                    I'll look into seeing if its possible. You would likely need to unlock the code to make any such comparison without a major overhaul to the builder. If all of your trading is done from the strategy you can just check the strategies Realized PnL.
                    Josh G.NinjaTrader Customer Service

                    Comment


                      #11
                      So it is possible to disable a strategy from within if a certain profit/loss is reached by it? And is it through the Builder?
                      Thanks.

                      Comment


                        #12
                        Yes, it would be possible with CloseStrategy(). No, it is not possible inside the strategy builder. Is that what you want available in the builder?

                        Josh G.NinjaTrader Customer Service

                        Comment


                          #13
                          Would be nice to able to have Builder do it. Like when certain amount of profit/loss is achieved by it during the session.
                          Thank you.

                          Comment


                            #14

                            I went ahead and submitted this request. The internal tracking number for your feature request is SFT-3599 . Please reference this internal tracking number if you ever have questions regarding this feature request.

                            When a feature request is implemented, you'll find it in the release notes:


                            Josh G.NinjaTrader Customer Service

                            Comment


                              #15
                              Thank you very much.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Christopher_R, Today, 12:29 AM
                              0 responses
                              9 views
                              0 likes
                              Last Post Christopher_R  
                              Started by sidlercom80, 10-28-2023, 08:49 AM
                              166 responses
                              2,235 views
                              0 likes
                              Last Post sidlercom80  
                              Started by thread, Yesterday, 11:58 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post thread
                              by thread
                               
                              Started by jclose, Yesterday, 09:37 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post jclose
                              by jclose
                               
                              Started by WeyldFalcon, 08-07-2020, 06:13 AM
                              10 responses
                              1,415 views
                              0 likes
                              Last Post Traderontheroad  
                              Working...
                              X