Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Optimism in backtesting

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

    Optimism in backtesting

    Hi,

    I have a feeling this has been covered somewhere before, but I couldn't find it spelled out exactly. Sorry about that.

    I am developing a strategy, and running it through optimization on daily bars over a large scale (2004-2010). Once I have this optimized, I'll reapply over a shorter time period with intra day granularity (minute bars). My question pertains to how NT will process daily bars with profit targets/stop loss and entries.

    I understand I am using OnBarClose. So if I enter a long position using EnterLong, it will use the open value of the next bar, right?

    Next, say I set a profit target of 10%. How intelligent is NT in getting the exit price?

    Say that in the next candle, the position shows a profit of 9% at open, 12% high, and 11% at close. Obviously, it passed through the 10% mark at some point during that candle. Will I see an exit showing profit of 10%, 11% or 12%? What about the reverse situation with a stop loss? Will NT detect that the price moved through this range inside of a bar, and allow me to exit at that price?

    Is the only way around this to use intraday granularity?

    #2
    Hello,

    Thank you for the question.

    For your first question yes this is correct.

    For your second question If you set set 10% NinjaTrader is smart enough to calcuate a price of 10%.

    For your third question. If the bar has prices that at least touch the 10%, it will fill at that 10% mark the same would go for the reverse as well.

    The last question would not apply in this case.

    Please let me know if I may be of additional assistance.

    Comment


      #3
      Thanks for the speedy reply. Glad to hear it!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      661 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      375 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 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
      579 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X