Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Does Ninja repaint price bars and/or strategy entries?

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

    Does Ninja repaint price bars and/or strategy entries?

    Dear all,

    I have developed a strategy using a live data feed from my Interactive Brokers account. There is a big difference between the price I get filled at when running the strategy in Ninja and backtesting it.
    Naturally there is such a thing as slippage, but these differences are simply too big.
    The slippage on the CAC40 future is 1-2 ticks which amounts to max 1 pnt, however the difference between the live fill and the backtest in the two examples I have attached are 3 and 5 points respectively.

    Does Ninja repaint bars and or strategy entries?
    Does it execute the strategy differently when live then during a backtest?
    Can the backtest therefore be trusted even when we add in regular expected slippage?
    How can this big difference be explained?

    And why in example 2 would the backtest trigger the trade only at 09:15 and the live fill already at 09:10?! It is the exact same unaltered strategy.

    I hope someone can shed some light on these issues.

    Kind regards,

    Vladja
    Attached Files

    #2
    Hello,

    Thank you for the questions.

    To start we have some of these items described in the help guide which can help answer the questions. It would be expected that a strategy performs differently between a BackTest vs Realtime as Intrabar data is not being used in a backtest. You can find more about this here: http://ninjatrader.com/support/helpG...htsub=backtest

    If you have not specifically made the strategy to use intrabar granularity, it would use Historical data during a back test using the Close prices and in realtime would perform as you had programmed it to.

    I would suggest reviewing the above link to answer these questions and if you need further explanation on this topic please let me know. We also have a sample showing how to make the results more in line with each other using Intrabar granularity here: http://ninjatrader.com/support/forum...ead.php?t=6652

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      Thanks for your swift reply.
      I understand that there are differences between live and test, what's more I expect them, but in these cases the differences are hard to explain.
      I fail to see how intrabar granularity could explain these differences, since all the strategy evaluations take place immediately on the close of each 5-minute bar beit live or in test, so not inside the 5 minute bar. At the close, the strategy conditions are either true or not.
      Under live circumstances you would expect some small tick slippage, but not 3-5 points.

      Intrabar granularity also does not explain why the backtest evaluates the strategy conditions to be true 5 minutes (1 bar) later than under live circumstances. It is the exact same strategy. Can you address this please?

      Many thanks,
      Vladja

      Comment


        #4
        Hello,

        Thank you for the reply.

        For this specific case, you would need to debug the script to find why the logic was executed at a different time. Because I am un aware of what logic/settings are being used this is not something I could directly answer. Instead you could use Prints to determine the values the conditions are using at the time of this execution in both live and realtime.

        Please let me know if I may be of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        2 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        1 view
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        6 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Working...
        X