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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          118 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          166 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          85 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          130 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          88 views
          0 likes
          Last Post PaulMohn  
          Working...
          X