Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
        JesseNinjaTrader Customer Service

        Comment


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

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Option Whisperer, Today, 09:55 AM
          0 responses
          3 views
          0 likes
          Last Post Option Whisperer  
          Started by geddyisodin, 04-25-2024, 05:20 AM
          8 responses
          58 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by halgo_boulder, 04-20-2024, 08:44 AM
          2 responses
          22 views
          0 likes
          Last Post halgo_boulder  
          Started by mishhh, 05-25-2010, 08:54 AM
          19 responses
          6,189 views
          0 likes
          Last Post rene69851  
          Started by gwenael, Today, 09:29 AM
          0 responses
          5 views
          0 likes
          Last Post gwenael
          by gwenael
           
          Working...
          X