Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how do you get the current day's profit loss?

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

    how do you get the current day's profit loss?

    how do i grab the current day's profit/loss?

    #2
    Hello amedhussaini,

    Thank you for your post.

    You will need to work with the TradePerformance class to get this information.

    The following reference sample can help with using this class and resetting values at the start of the day:
    http://www.ninjatrader.com/support/f...ad.php?t=19289
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      NinjaTrader_RyanM,

      My system comes out with zero hits after I added the code to check ((Position.GetProfitLoss(Close[0], PerformanceUnit.Points) > 0). If I // that and make it comments, my strategy come out with a profit of 39180.00 and a 44% Profitable. Am I getting garbage in the input because those
      performance checks give my program zero results. I think it might be blowing up on if ((Position.MarketPosition != MarketPositon.Flat). I believe I need to add OnExecution(IExecution execution), and iOrder Routines, etc.

      Comment


        #4
        Hello William staton,

        Welcome to the NinjaTrader forums!

        Yes, if you have that check for your entries, then you will likely not get trades.

        If there is no PnL to check then no trades can be placed to generate PnL.

        Let us know what you're trying to do, share some more code and we can assist further.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Position.GetProfitLoss(Close[0]

          NinjaTrader_RyanM,

          You were right! I did the test after i did a buy or sell and then I was able to interrigate the Position GetProfitLoss(Close[0] and it ddn't blow up. Thanks. Now, since I've implemented the code I'm close to 50%, but my profits are going down. I'm using the
          Back101 test data. I was trying to use the SIM101 account. I put my userid, password, for Mirus Futures, and I couldn't find the SIM101 Account. How do I get to the SIM101 Account? Do I have to have Mirus give me one? Thanks for your help.

          Comment


            #6
            Hello William,

            Please see my response to the email you sent us below.

            The sim101 account should be listed in NinjaTrader. However it will not be listed in the Strategy Analyzer, instead it will list the Back101 account.

            If you open up a SuperDOM, it should list the sim101 account.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            582 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            338 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            554 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            552 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X