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

order fill resolution

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

    order fill resolution

    When running optimizations and backtests on my strategy, I get better results when i use standard resolution fill processing rather than using high resolution. How would I mimic these standard resolution fill resolution executions in my real life strategy?

    it seems like it works better to wait to reverse the position until the open 2 bars after the ma cross instead of the open of one bar after the bar during which the cross happened
    Last edited by trader3000a; 09-29-2021, 06:32 PM.

    #2
    Hello trader3000a,

    Thanks for your post.

    If you see your strategy has better results using standard fill resolution then you would likely just need to apply the strategy realtime. That said, it may not be possible to fully mimic the results you see during a backtest when running your strategy realtime.

    Please review the help guide document on the differences on real-time vs backtest (historical).
    http://ninjatrader.com/support/helpG...ime_vs_bac.htm

    It is expected that a strategy running real-time (live brokerage account, live market simulation, Playback connection etc...) will produce different results than the performance results generated during a backtest.

    When in historical data, only the Open, High, Low, and Close will be available and there will be no intra-bar data. This means actions cannot happen intra-bar, fills cannot happen intra-bar. All prices and actions come from and occur when the bar closes as this is all the information that is known.

    Because of this, OnBarUpdate will only update 'On bar close' as it does not have the intra-bar information necessary for 'On price change' or 'On each tick' and the script will not have the intra-bar information to accurately fill an order at the exact price and time.

    Below is a link to the help guide on Calculate.
    https://ninjatrader.com/support/help.../calculate.htm

    To improve the accuracy of a backtest, you may use Tick Replay along with an added 1-tick series to have logic processed intra-bar and have orders filled intrabar.

    Tick Replay would be used to have the logic process OnEachTick or OnPriceChange with historical data, but this does not allow for intra-bar order fills. You would need to add a single tick data series and submit orders to that single tick data series for a strategy that uses Tick Replay.

    High Order Fill Resolution allows for intra-bar order fills with historical processing, but is not compatible with Tick Replay.

    Please reference the SampleIntrabarBacktest example and the following Help Guide links for more information.

    SampleIntrabarBacktest 'Backtesting NinjaScript Strategies with an intrabar granularity' - https://ninjatrader.com/support/helpGuides/nt8/backtesting_ninjascript_strate.htm

    TickReplay — https://ninjatrader.com/support/help...ick_replay.htm

    Developing for Tick Replay -
    https://ninjatrader.com/support/helpGuides/nt8/developing_for__tick_replay.htm?zoom_highlightsub= developing+for+tick+replay

    Additional information may be found in this NinjaTrader Forum post —
    https://ninjatrader.com/support/foru...mance?t=102504

    Please let us know if we may be of further assistance to you.
    Last edited by NinjaTrader_BrandonH; 09-30-2021, 07:13 AM.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by michi08, 10-05-2018, 09:31 AM
    2 responses
    737 views
    0 likes
    Last Post Denver_Wayne  
    Started by sightcareclickhere, Today, 01:55 PM
    0 responses
    1 view
    0 likes
    Last Post sightcareclickhere  
    Started by Mindset, 05-06-2023, 09:03 PM
    9 responses
    258 views
    0 likes
    Last Post ender_wiggum  
    Started by Mizzouman1, Today, 07:35 AM
    4 responses
    18 views
    0 likes
    Last Post Mizzouman1  
    Started by philmg, Today, 01:17 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Working...
    X