Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pause trading once Daily Profit or Loss is hit - Need for backtesting

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

    Pause trading once Daily Profit or Loss is hit - Need for backtesting

    Hello

    Strategy is not working the way it should, i have a similar strategy working perfectly fine but it requires me to enable it daily and can not be used for back testing.

    This strategy checks for realized + unrealized PnL and pauses trading for the day if daily set LimitPnl or DrawDown(DD) is hit and starts again with the start for evening session.

    But it is not able to "reset" for new session.

    I am using it on NQ Unirenko chart but entry conditions could be anything but strategy needs to calculate cumulative PnL for n number for days.

    Please help!
    Attached Files

    #2
    ​attaching screenshots...
    Attached Files

    Comment


      #3

      ​attaching screenshots...​
      Attached Files

      Comment


        #4
        Hello TradingSingh

        To get a better idea of what is happening in this strategy you can use Print statements to output the PnL values an also when your conditions are becoming true, that would allow you to debug the strategy in a specific use case. The strategy provided looks similar to the PnL sample offered here on the forum which is known to work with backtesting. You can also compare against that sample to see where your logic may deviate. I have linked that sample below.

        Hello, I've updated the DailyLossLimit and DailyLosLimitMultiTrade examples that were posted on the forum for NinjaTrader 7 for NinjaTrader 8. These are often requested and I felt they are good examples to have for NT8. DailyLossLimitExample_NT7 - http://ninjatrader.com/support/forum...241#post451241 (http://ninjatrader

        Comment


          #5
          Thank you Jesse for super quick response, I will review the examples

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          50 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          126 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          69 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X