Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stop trading after you reach your max DD

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

    stop trading after you reach your max DD

    If I want to stop the strategy from executing each day if I reach my personal, maximum daily draw down limit, e.g.,:

    protected override void OnBarUpdate()
    {
    if(Performance.AllTrades.TradesPerformance.Currenc y.DrawDown > 5000)
    {
    trade_allowed = false;
    }

    .....does Performance.AllTrades.TradesPerformance.Currency.D rawDown get reset each day? How often does it change? Or is it a cumulative number that only increases as long as the strategy is going?

    thanks,
    D

    #2
    Hi Paschall,

    Thank you for your post.

    You are correct in that it is a cumulative number that only increase as long as the strategy is running.

    Each strategy will have it's own instance of the Performance and can be reset by disabling and re-enabling the strategy.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hi Cal,
      Thanks for the confirmation. So what would be a better way, then, to keep track of a Daily max draw down? And so I can disallow the strategy that DAY (but like they Scarlett O'Hara saiid at the end of "Gone With The Wind"....'Tomorrow is a new day")?

      Thanks for your help,
      D

      Comment


        #4
        Paschall,

        You will need to assign a variable with the Max Draw Down values.

        You can create the filter to stop trading after you've hit your Max Draw Down and then when a new day is reached or new session you can reset that variable

        http://www.ninjatrader.com/support/f...ad.php?t=19182
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by paschall View Post
          Hi Cal,
          Thanks for the confirmation. So what would be a better way, then, to keep track of a Daily max draw down? And so I can disallow the strategy that DAY (but like they Scarlett O'Hara saiid at the end of "Gone With The Wind"....'Tomorrow is a new day")?

          Thanks for your help,
          D
          Iterate backwards through the Trades to find the ones that have an entry and or exit on the current day, and use that to calculate the drawdown. You do that by querying the Trade.Entry or Trade.Exit IExecution object returned.

          ref: http://www.ninjatrader.com/support/h.../nt7/trade.htm

          Comment


            #6
            Yes, this is my approach. Alreayd assigned the variables. Just wondering if there was a built-in DD function that was reset automatically each session (session DD). Would be a handy feature to have.

            Performance.DrawDown.Hour
            Performance.DrawDown.Session
            Performance.DrawDown.Total

            Thanks again.
            D

            Comment

            Latest Posts

            Collapse

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