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 burtoninlondon, 05-01-2024, 10:13 AM
          2 responses
          24 views
          0 likes
          Last Post burtoninlondon  
          Started by LillyMarv, Today, 06:47 AM
          0 responses
          1 view
          0 likes
          Last Post LillyMarv  
          Started by Salahinho99, Today, 04:13 AM
          0 responses
          16 views
          0 likes
          Last Post Salahinho99  
          Started by junkone, 04-28-2024, 02:19 PM
          8 responses
          93 views
          1 like
          Last Post brucerobinson  
          Started by mkouitra, 10-23-2021, 04:40 PM
          17 responses
          1,972 views
          0 likes
          Last Post NinjaTrader_Jason  
          Working...
          X