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

Strategy places orders with StategyAnalyzer but NOT with MarketReplay or Realtime

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

    Strategy places orders with StategyAnalyzer but NOT with MarketReplay or Realtime

    Hello Support,

    I am trying to test a strategy. I execute it using Strategy Analyzer and it works fine placing orders, produces trades, etc.

    I tried to execute the same strategy in Realtime using Kinetic, NT7 will enable the strategy onto the chart with a status of GREEN.

    But it does NOT immediately place an order, or any orders on startup nor after a new bar.

    This behavior is true for MarketReplay as well.

    I've tried...

    1. Shutdown NT and restart.
    2. Shutdown NT, Delete workspaces and restart NT
    3. Re-Install NT

    None of the above made any difference.

    I've uploaded screen prints.

    Pic01 & Pic02 show adding the strategy to chart while connected to Kinetic

    Pic03 shows the same strategy executed using Strategy Analyzer against a basket of instruments

    Is there some setting I'm missing ?

    Please help and let me know

    Thank you
    Attached Files

    #2
    Hello rayko,

    Thanks for opening the thread.

    The Strategy Analyzer uses Historical data as opposed to Real-time Data. Market Replay will mimic the Real-time so it can recreate the data that passes through our charts on an active live connection.

    If a strategy is not submitting orders, its code must be debugged to find out why the orders are not submitting. This can be done by placing Print() statements outside of the conditions used to fire your order methods that tell you the value of the variables used in each condition. This will tell you if the conditions used to fire the orders becomes true, and if they are not, you can clearly see where the logic is not allowing so.

    Debugging the strategy will require access to strategy's source code and a basic understanding of C# to be able to add the prints and interpret the data printed in the Output window.

    If this is not a strategy that you have written, you may wish to reach out to the developer to get further information on why orders were not submitted. We could also connect you with a list of consultants who would be happy to debug the code for you if you have the strategy's source code.

    I've included some links on debugging and the discrepancies between Historical and Realtime data.

    Dicrepancies between Realtime and Backtest - https://ninjatrader.com/support/help...ime_vs_bac.htm

    Comparing real-time, historical, and replay performance - https://ninjatrader.com/support/foru...d.php?t=102504

    Debugging - https://ninjatrader.com/support/foru...ead.php?t=3418

    Trace Orders - https://ninjatrader.com/support/foru...ead.php?t=3627

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

    Comment


      #3
      Hello,

      I use a second machine to trade. I installed this strategy onto it and it works FINE.

      So its NOT the code.

      There is something in the settings of NT7 on the first machine I was using that is causing this failure.

      Can you please tell me or guess what area of settings in NT7 I can inspect and compare between the instances that work and the other that does not.

      I've uploaded a screen scrape of the strategy working on the other machine.

      Thank you
      Attached Files

      Comment


        #4
        Hello rayko,

        Thanks for your reply.

        Strategies operate off of the data series they are applied to. The settings that would make the most impact on the strategy results would be the strategy settings and the data series that the strategy is attached to.

        As a first step, please make sure you have the same version of the strategy imported on both platforms. You can export the strategy and then re-import the strategy that has been exported on the platform that has working results.

        NinjaScripts can be imported and exported from the Control Center under File > Utilities > Import NinjaScript and File > Utilities > Export NinjaScript

        If the strategy is working on one machine and not the other, I would suggest to find an instrument and time frame that works on one machine and then create the same chart with the exact data series parameters on the other machine.

        Once the chart is created, enable the strategy making sure that the strategy parameters match how you have entered them on the machine that exhibits working results.

        I would recommend to use an interval of Market Replay data to test with as Market Replay gives you much more control to review certain actions of your strategy.

        Essentially, Same code + Same input data + Same parameters = Same results.

        Please let me know if these steps do not resolve your inquiry.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by lorem, Today, 09:18 AM
        1 response
        3 views
        0 likes
        Last Post lorem
        by lorem
         
        Started by bmartz, Today, 09:30 AM
        0 responses
        1 view
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by GussJ, 03-04-2020, 03:11 PM
        14 responses
        3,244 views
        0 likes
        Last Post GussJ
        by GussJ
         
        Started by ArkansasClint, Today, 09:28 AM
        0 responses
        0 views
        0 likes
        Last Post ArkansasClint  
        Started by hazylizard, Today, 08:38 AM
        4 responses
        12 views
        0 likes
        Last Post hazylizard  
        Working...
        X