Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Question about Backtesting/Optimizing with Tick Data

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

    Question about Backtesting/Optimizing with Tick Data

    I'm looking information about what's the difference between these options when using Backtest and Optimization:

    - Using High Fill Order Resolution / Standard
    - Using Tick Replay
    - Adding a secondary data series of 1 tick into the program

    I think if add the 1 tick programmatically you do not need to use High Fill Order resolution or Tick Replay, please do correct me if I'm wrong.

    Thank you

    #2
    Hi Waxavi, thanks for posting. You can not use both high-order fill resolution and Tick Replay at the same time. Tick Replay is used to re-create the price movement of historical bars and is used for better Indicator and price action calculations. High order fill resolution forces the script to use a selected data series (usually 1 tick or 1 second bar data) to estimate if an order should have filled or not. One can use Tick replay and high order fill resolution at the same time if they place their orders on a 1 tick series in the script itself (using AddDataSeries).
    Please see here for further reading:

    https://forum.ninjatrader.com/forum/...-backtest-live

    https://ninjatrader.com/support/help...fill_logic.htm //this page describes the algorithm used to check for order fills.

    Kind regards,
    -ChrisL
    Last edited by NinjaTrader_ChrisL; 03-22-2023, 03:47 PM.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello ChrisL,

      From the first link, I can notice that:

      In NinjaTrader 8, there have been two new enhancements so that programmers may not have to manually add this secondary series and code the script for high accuracy fills (Order Fill Resolution) or for intra-bar actions (TickReplay) depending on the needs of the script.

      The first is TickReplay.
      TickReplay is used for the intra-bar actions. This adds a 1 tick series to the script to be used for triggering OnBarUpdate when Calculate is set to .OnEachTick or .OnPriceChange. This also allows OnMarketData to trigger historically for last market events only (the bid and ask will not trigger).
      -TickReplay will allow for indicators to update for each tick or price change and for scripts to trigger actions intra-bar.
      -TickReplay must be enabled for the Calculate setting in State.SetDefaults to take effect in the Strategy Analyzer.
      -TickReplay allows for IsFirstTickOfBar to work correctly in historical data and will be true for the first tick of the bar only.
      -TickReplay does not provide fill prices for accurate order fills.

      The second is Order Fill Resolution.
      This has two settings, Standard and High. When set to standard, the behavior of order fills will be accurate to the close of the bar without any intra-bar information. When set to High, this allow you to select a secondary data series to be used to provide intra-bar pricing information solely for the purpose of order fill accuracy. The highest you could set this to is 1 tick.
      -Order fill resolution does not provide intra-bar granularity to OnBarUpdate for actions to be triggered intra-bar.
      -
      Order fill resolution does not enable IsFirstTickOfBar to work correctly in historical data.
      -Order fill resolution does not work with multi-series scripts using AddDataSeries(). If using AddDataSeries(), manually implement 1 tick granularity.​
      This means that if I add 1 Tick data series programmatically, I don't need to use tick replay nor high fill resolution?

      As for the second link, it is broken

      Thanks

      Comment


        #4
        Hi Waxavi, Tick replay would not be needed if you use a 1 tick data series. See the example below for one use case for a 1 tick series. I fixed the link in my previous post as well.

        Is it possible to specify which indicators use the DataSeries -> Tick Replay = True in a chart. I have the need to have 2 indicators load by the tick, but there are others on my chart, when I do that the chart takes many, many minutes to load. The time to load goes from 10 - 15 sec to over 25 minutes (per chart). and I
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Thank you ChrisL

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by carnitron, Today, 08:42 PM
          0 responses
          5 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Today, 07:51 PM
          0 responses
          7 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,974 views
          3 likes
          Last Post jhudas88  
          Started by rbeckmann05, Today, 06:48 PM
          0 responses
          8 views
          0 likes
          Last Post rbeckmann05  
          Started by rhyminkevin, Today, 04:58 PM
          4 responses
          58 views
          0 likes
          Last Post dp8282
          by dp8282
           
          Working...
          X