Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarClose and Backtest

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

    BarClose and Backtest

    Hi,

    I trade an intrabar strategy which also calculate and set BE+1 intrabar.

    The help guide says "During backtest, strategies can ONLY be processed at the close of each bar".

    The backtest positions looks all right, but when BE+1 should be set intrabar, it's set on the open of the next bar (bar close), so not à the good level.
    This way the backtest gives wrong results.

    Is there a way to deal with this or can't I backtest this strategy ?

    Thanks !

    #2
    kafeu, that's correct if you're dealing for example with a single series strategy that would only 'know' the bar's OHLCV info - however you could add finer granularity to a script to try simulating intrabar fills / conditions - http://www.ninjatrader.com/support/f...ead.php?t=6652

    Easiest thought for your would be running your strategy on CalculateOnBarClose = false in Market Replay which would know the intrabar tick formation then.

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      In SampleIntrabarBacktest strategy exemple, COBC is set to true.
      Could I use this hack with COBC = false ?

      Also I use 8 range bars, could use that with range 1 + range 8 ?

      Thx

      Comment


        #4
        In backtesting COBC is always 'true', however it's 'true' here for the 1 Range series in your example, meaning you can access this quicker series and work your conditons here instead of waiting for the update on the 'too slow' series (your 8 Range).
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Actually, mu strategy uses COCB = false and I don't want to have to versions: one for backtesting and one for live. Looks like my strategy is running quite fine in the Strategy Analyser.

          To work around intrabar needs, I'll try to add a 1 range series.

          Thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rajendrasubedi2023, Today, 09:50 AM
          3 responses
          15 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by lorem, Today, 09:18 AM
          2 responses
          11 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by geddyisodin, Today, 05:20 AM
          4 responses
          29 views
          0 likes
          Last Post geddyisodin  
          Started by geotrades1, Today, 10:02 AM
          2 responses
          10 views
          0 likes
          Last Post geotrades1  
          Started by ender_wiggum, Today, 09:50 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X