Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CumProfit and Position Sizing

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

    CumProfit and Position Sizing

    Hi, I am using the CumProfit in the following manner:

    Performance.AllTrades.TradesPerformance.Currency.C umProfit

    and using this value to determine position size for the next trade.

    My question is this: What happens if NinjaTrader is closed, does my strategy still know to trade the proper size or is the cumprofit forgotten about?

    #2
    CumProfit resets to zero every time the strategy is disabled.

    Comment


      #3
      Thank you Radical for the response.

      After much searching around this forum and other forums around the net I am still unsure of how to implement a system so that the strategy DOES remember the cumulative profit, even after turning NinjaTrader off to reboot computer. I assume (and probably incorrectly) that I would write the data to some sort of file for storage on my local hard drive and read that file into the strategy to use the proper position sizing?

      Any help would be much appreciated!

      Thanks, R3.

      Comment


        #4
        This may not be the best option, and I'm sure some people here would know a better way, but I guess a simple way of doing it would just be to get the CumProfit while the strategy is running, and every time it updates (maybe use OnPositionUpdate for this), write the value of CumProfit to a text file. Then the next time you run the strategy, just get the CumProfit value from the text file and use that to adjust your position size.
        Last edited by Radical; 07-05-2012, 10:18 PM.

        Comment


          #5
          Originally posted by Radical View Post
          This may not be the best option, and I'm sure some people here would know a better way, but I guess a simple way of doing it would just be to get the CumProfit while the strategy is running, and every time it updates (maybe use OnPositionUpdate for this), write the value of CumProfit to a text file. Then the next time you run the strategy, just get the CumProfit value from the text file and use that to adjust your position size.
          Radical, I cannot thank you enough for taking your time and posting here. I am now looking into the following link as a way to accomplish what you have described:



          Am I headed down the right road?

          Thanks again, R3

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          648 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          369 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          573 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          575 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X