Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting on tick data

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

    Backtesting on tick data

    Hi All,

    I have Kinetick tick data and I want to run my strategy that is set to CalculateOnBarClose=false.
    Does the Strategy Analyzer call the OnBarUpdate() every tick in my data?

    Thanks in advance

    #2
    Hello freewind,

    In a backtest, strategies call OnBarUpdate() only on bar close. CalculateOnBarClose = false is only used in real time operation.


    For intrabar granularity in a backtest you must add a secondary series that is smaller than the first, but all logic is still only processed on bar close.
    Last edited by NinjaTrader_RyanM1; 02-09-2011, 09:44 AM.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Yes it can, if you use "add tick"

      Comment


        #4
        Baruch,
        What do you mean?

        BTW a hack that I thought about and seems to work is to use Tick bars of 1.

        Comment


          #5
          Why do you call it a hack? I use it all the time.
          What I mean is that if you want to trade form X min bars, but you have tight stops or target then add in initialize: Add(PeriodType.Tick, 1);
          Then you'll have secondary bars on which you can track your trades.

          Comment


            #6
            Baruch,

            When I am working with MTF strategies i generally set one time frame to 1 min, and i run all code within that BIP index. I will then reference the other time frames i work with from within the 1 min data, this seems to allow entry much more accurately than trying to say run a 15 min indicator within a 15 min BIP index. Does this make sense?

            I am basically trying to implement what Multicharts would have considered LIB=1 with Intrabar execution on.

            It appears to be working but with 10 years of 1 min data the results are obviously slow. I used to work with 5 min LIB on systems to start with and as they looked promising i would lower the LIB to 1 min but the tests would naturally take 5 times longer.

            It seems with NT that the setting of one min or 5 min does not affect total optimizer performance, which is strange since its 5 times the amount of data.......

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            67 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            36 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            61 views
            1 like
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            62 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            53 views
            0 likes
            Last Post CarlTrading  
            Working...
            X