Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar close

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

    Bar close

    Let's see if I explain it well:

    I wan't to use an strategy that if the last bar is close price > last bar open price then Enter long position and Exit long position when the actual bar closes. And when last bar close price < last bar open price then Enter short position and Exit short position when the actual bar closes.
    I mean a trade per bar.
    How can I do that with the wizard? The Enter position is ok, but not the Exit

    #2
    cozar534,

    You can't enter and exit on the same bar in backtesting because you do not have enough granular information. You have OHLC at the close of each bar. This means you can calculate your strategy once at the end of each bar. At bar close, you place an order at the open of the next bar. When you try to evaluate the exit you do so at the close of the bar you entered. Since the bar has closed, you can only exit at the open of the next bar (which is also the same event as the close of the previous bar).
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      So I cannot backtest this Strategy, can I?

      Comment


        #4
        cozar534,

        Technically you can, but it requires more tweaking than what the Strategy Wizard can offer. You would need to do what is outlined in this article: http://www.ninjatrader-support2.com/...ead.php?t=6652
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Ok, thanks, I'll try it

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          68 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          41 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          24 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          27 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          54 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X