Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting NinjaTrader vs TradeStation

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

    Backtesting NinjaTrader vs TradeStation

    I am sorry that this is a question probably more on TradeStation, but I am hoping there are others that have experience in both platforms. I have been trying to duplicate my intraday Strategy from NinjaTrader to TradeStation in order to prove that the results are similar on 2 platforms and using different data sources. This proves it's not a hack on one system and a total failure on another.

    The trade executions times are in sync about 95% of the time, which is acceptable. However, the back testing on both systems is a night and day difference. In backtesting on TradeStation, 70% of the time, the fills are unfavorable and off by 2-3 points NOT ticks. On TS, the Net Profit is always negative and the Equity Line is downward sloping, but on NT it is profitable with a positive equity line.

    I am hoping this observation can ring a bell about a solution:

    When running forward testing with real time data on both platforms at the same time, the PnL either matches to the tick in MOST cases, but sometimes is off by 1-2 ticks. This is acceptable and realistic. That tells me that both TS and NT are getting close fills during real time. But the question is - if real time has close fills, why are the historical back test fills so drastically different?

    I am hoping this is a configuration issue or something small that I am missing.

    Thanks in advance.

    #2
    Hello szayedoud,

    Thank you for your post.

    Unfortunately, I am unable to comment on TradeStation's backtesting results.

    I can provide some insight on NinjaTrader's backtesting / Strategy Analyzer results.

    Live orders are filled on an exchange with a trading partner on an agreed upon price based on market dynamics. Backtest orders are not using these market dynamics. Instead these are filled based on logical rules from processing historical data.
    • 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.
    Intra-bar granularity adds a second data series such as a 1 tick series using AddDataSeries() so that the strategy or indicator has the individual ticks in the historical data in between the High and Low of the primary series.

    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.
    Note: bar types that are IsRemoveLastBarSupported cannot be used with TickReplay and generally cause inaccurate results when backtesting in historical data.
    Note: High Order Fill Resolution allows for intra-bar order fills with historical processing, but is not compatible with Tick Replay.


    Please see this forum post for a detailed explanation:

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


    This thread will also remain open for any members of the community who may want to share their thoughts. ​
    Gaby V.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    6 responses
    3,290 views
    1 like
    Last Post jgualdronc  
    Started by Touch-Ups, Today, 10:36 AM
    0 responses
    7 views
    0 likes
    Last Post Touch-Ups  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    8 responses
    61 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Option Whisperer, Today, 09:55 AM
    0 responses
    8 views
    0 likes
    Last Post Option Whisperer  
    Started by halgo_boulder, 04-20-2024, 08:44 AM
    2 responses
    24 views
    0 likes
    Last Post halgo_boulder  
    Working...
    X