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 bortz, 11-06-2023, 08:04 AM
          47 responses
          1,606 views
          0 likes
          Last Post aligator  
          Started by jaybedreamin, Today, 05:56 PM
          0 responses
          9 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          19 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          6 views
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          15 views
          0 likes
          Last Post Javierw.ok  
          Working...
          X