Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Over Midnight tick data - strategy liquidation

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

    Over Midnight tick data - strategy liquidation

    Hi,

    I have a strategy that I backtest on multiple days, which holds positions overnight. I backtest the strategy using tick data, and exit on close = false. Products used: GC and SI futures bid-ask-last.

    If I backtest with a sessionthat stops before midnight, the strategy works fine, I can backtest 5 days in a row.

    If I backtest using session 24/5 or instrument template (which is also over midnight), NT stops the simulation at 23:59:59 of the first day and liquidates the strategy. The liquidation does not come from my strategy, here is the stacktrace to Ontermination:

    Code:
       at NinjaTrader.Strategy.BaseStratCode.OnTermination() in c:\Users\.........
       at NinjaTrader.Strategy.StrategyBase.EnsureLifeTimeStatus(LifeTimeStatus status)
       at NinjaTrader.Strategy.StrategyBase.RunBackTest()
       at NinjaTrader.Strategy.StrategyAnalyzer.RunBackTestInWorkerThread(Object state)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
    ???????????????????

    #2
    benoirat, thanks for the report benoirat - would this happen only for backtesting this custom strategy or would you see it on this template as well for those instruments on our SampleMACrossOver script?

    Would you mind contacting us via Help >> Mail to Support so we could review log / traces from this setup?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Mailed,

      I hope this will help. In the meantime creating a session that stops just before and starts just after midnight enables me to backtest.

      I did try a built in strategy on GC and it did run overnight on the 24/5 session though

      Comment


        #4
        Thanks, will check into it. If the default scripts worked fine, would then suggest isolating out what parts break this part in your custom script.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Will try that out yes. Thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pvincent, 06-23-2022, 12:53 PM
          14 responses
          238 views
          0 likes
          Last Post Nyman
          by Nyman
           
          Started by TraderG23, 12-08-2023, 07:56 AM
          9 responses
          382 views
          1 like
          Last Post Gavini
          by Gavini
           
          Started by oviejo, Today, 12:28 AM
          0 responses
          1 view
          0 likes
          Last Post oviejo
          by oviejo
           
          Started by pechtri, 06-22-2023, 02:31 AM
          10 responses
          125 views
          0 likes
          Last Post Leeroy_Jenkins  
          Started by judysamnt7, 03-13-2023, 09:11 AM
          4 responses
          59 views
          0 likes
          Last Post DynamicTest  
          Working...
          X