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 charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            61 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            148 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            162 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            98 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            286 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X