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

How to get the most accurate order fills for OnEachTick / intra-bar strategies ?

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

    How to get the most accurate order fills for OnEachTick / intra-bar strategies ?

    I've read all the documentation mentioned on this page, but I'm still a bit confused about what is the most reliable way to backtest strategies that need to place intra-bar orders and rely on calculate set to OnEachTick

    At the moment
    • my strategy is set with Calculate to OnEachTick
    • adds a 1-tick data series and places its orders onto that 1-tick bar series to get intra bar fills
    • In the strategy analyzer, I'm enabling Tick Replay
    • In the strategy analyzer, I'm enabling Include Commissions
    • In the strategy analyzer, I'm using a slippage of 2

    Now the strategy I'm testing is just a simple scalping strategy on NQ. It uses tight stops and targets like 10 ticks max
    Because of the tight stops and targets, I would like to get the most accurate order fills possible to get the best backtesting results
    However on this page NinjaTrader states
    TickReplay does not provide fill prices for accurate order fills
    But if tick replay does not provide accurate order fills, then what does?
    I looked at order fill resolution, but that seems to be doing more or less the same by just adding an extra data series which it uses to place the orders on
    So that doesn't seem to add anything, does it? And besides that, it does not support strategies that use calculate OnEachTick

    So I hope NinjaTrader can shed some light on this, what would be the most reliable way for us to get the most accurate order fills for
    strategies which use Calculate to OnEachTick and need to place intra-bar orders.
    I can understand that it will never be 100% accurate, but it would help to know what is the most accurate method possible

    regards

    Erwin







    Last edited by EB Worx; 08-28-2021, 12:52 AM.
    EB Worx
    NinjaTrader Ecosystem Vendor - EB Worx

    #2
    Hello EB Worx,

    "But if tick replay does not provide accurate order fills, then what does?"

    Adding the 1 tick series and submitting orders to the BarsInProgress of that 1 tick series, called intra-bar granularity, is what provides accurate order fills. The orders are filled with 1 tick data to the time and price of the tick.

    A small note, one unfortunate limitation with having the accurate order fills in historical, is that slippage cannot be applied to market orders. (The 1 tick series cannot add ticks without being outside of the fill bar)

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea

      Thank you for your answer, so basically you are saying that I was already on the right track ?
      For slippage I'll see if I can add this in my strategy itself by placing the order a bit later, just so I can backtest what happens
      Thanks again
      Erwin
      EB Worx
      NinjaTrader Ecosystem Vendor - EB Worx

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by inanazsocial, Today, 01:15 AM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by rocketman7, Today, 02:12 AM
      0 responses
      6 views
      0 likes
      Last Post rocketman7  
      Started by dustydbayer, Today, 01:59 AM
      0 responses
      1 view
      0 likes
      Last Post dustydbayer  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      5 responses
      23 views
      0 likes
      Last Post trilliantrader  
      Started by Davidtowleii, Today, 12:15 AM
      0 responses
      3 views
      0 likes
      Last Post Davidtowleii  
      Working...
      X