Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Money Management & Back Testing

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

    Money Management & Back Testing

    I am writing a strategy in which I want to exit daily after a certain profit target for the day. I have reviewed the example using Performance.AllTrades... This works of course but when backtesting CumProfit applies to all historical trades. Is there any way to check this daily (while back testing; I understand usring RealtimeTrades will work in real time), e.g. for each trade day in back test, trading stops after profit target is hit for day and then trading starts the next day and so on.

    #2
    netjms, you would need to self calculate this needed value, a related sample showing how to loop through the trades count to arrive at a daily counter for this is found here - http://www.ninjatrader.com/support/f...ad.php?t=19289

    Comment


      #3
      Bertrand,

      Is this possible to granulate over various time periods instead of just the current day. I.e. it checks the performance of the previous day, week, month, etc.

      thanks

      Comment


        #4
        wahooj, yes the same idea and stats could be used to accumulate the needed values over a custom period of time (i.e. weekly, biweekly).

        Comment


          #5
          sorry i should have also asked where to specify.
          If I kept the FirstBarOfSession statement would I then have to specify the duration of the session, If so some code would be great.

          thx

          Comment


            #6
            Unfortunately I would not have a sample for this ready, you would need to rework the logic in this case, the reset for your cumulations would then be for example the start of a new week - http://www.ninjatrader-support.com/H...DayOfWeek.html

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            649 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            370 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
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            576 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X