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 trilliantrader, 04-18-2024, 08:16 AM
          7 responses
          27 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by samish18, 04-17-2024, 08:57 AM
          17 responses
          64 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by rocketman7, Today, 02:12 AM
          2 responses
          19 views
          0 likes
          Last Post rocketman7  
          Started by briansaul, Today, 05:31 AM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by PaulMohn, Today, 03:49 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X