Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Replay for past contracts

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

    Market Replay for past contracts

    Hello,

    I am running a custom strategy and indicator in market replay for the current contract of MNQ 03-25 and it works fine. I am accessing both the regular 15 minute bar chart as well as volumetric data. No issues. But when I do the same thing with downloaded tick data for the past contract MNQ 12-24, no trades take. I ensured that I changed the referenced ticker in the custom indicator and strategy to match MNQ 12-24 but still no trades processed. Is there a way to fix this? Perhaps I'm missing something obvious?

    Also, is it possible to get past contracts or is all contract tick data past 90 days impossible to retrieve for backtesting in market replay?

    #2
    Hello Kmace20,

    Have you changed the chart to MNQ 12-24 as well?

    Is the playback time and date set to a day where you have data showing as available in the Tools > Historical Data window > in the Market Replay section?

    The most popular futures and forex instruments are recorded on our market replay server and will usually have up to 90 days worth of data available.
    https://ninjatrader.com/support/helpGuides/nt8/index.html?set_up12.htm#HowToDownloadPlaybackDataF romTheNinjaTraderServer

    If this does not provide the market replay data desired you may want to look into a 3rd party that provides market replay data for the NinjaTrader platform.
    Click here for a google search link for 'Download NinjaTrader Market Replay Data'
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello Kmace20,

      Have you changed the chart to MNQ 12-24 as well?

      Is the playback time and date set to a day where you have data showing as available in the Tools > Historical Data window > in the Market Replay section?

      The most popular futures and forex instruments are recorded on our market replay server and will usually have up to 90 days worth of data available.
      https://ninjatrader.com/support/helpGuides/nt8/index.html?set_up12.htm#HowToDownloadPlaybackDataF romTheNinjaTraderServer

      If this does not provide the market replay data desired you may want to look into a 3rd party that provides market replay data for the NinjaTrader platform.
      Click here for a google search link for 'Download NinjaTrader Market Replay Data'
      Yes. I have the chart for backtesting in market replay set to MNQ 12-24. And the available data to downloaded, as of today, for that contract was starting at 11/07 so I downloaded from then and ran it until 12/20. I also have ensured that a few days of historical data are downloaded prior to the tick data (I understand there is not tick data for that portion) because the strategy requires a certain number of bars to trade and historical levels are still relevant to the strategy for referenced point of entry. The strategy gets processed fine and will display the called indicator but no trades will process. I have ensured that the strategy is enabled as well.

      Comment


        #4
        Hello Kmace20,

        The rollover is on Dec 16, so I would not expect playback from 12/16 to 12/20.

        Are you seeing the chart building bars as you playing back the playback on 11/20?


        If the data is playing back on the chart visually and opening new bars, the issue is with the script code.

        If the expected trade(s) are not appearing, this would indicate that the condition to place the order is not evaluating as true and the order is not being submitted, or the order is being ignored for other reasons, or the order is being cancelled or rejected.

        To understand why the script is behaving as it is, such as placing orders or not placing orders or drawing objects when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

        In the strategy add prints (outside of any conditions) that print the date time of the bar and all values compared in every condition that triggers the action.
        The prints should include the time of the bar and should print all values from all variables and all hard coded values in all conditions that must evaluate as true for this action to be triggered. It is very important to include a text label for each value and for each comparison operator in the print to understand what is being compared in the condition sets.
        The debugging print output should clearly show what the condition is, what time the conditions are being compared, all values being compared, and how they are being compared.

        Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

        Further, enable TraceOrders which will let us know if any orders are being ignored and not being submitted when the condition to place the orders is evaluating as true.
        After enabling TraceOrders remove the instance of the strategy from the Configured list in the Strategies window and add a new instance of the strategy from the Available list.
        Last, print the order.ToString() at the top of the OnOrderUpdate() override, as this will show us when orders become working and are being filled, and print the GetCurrentAsk() and GetCurrentBid() in OnOrderUpdate() as well so we can see what the market price is at the time of a fill.

        I am happy to assist you with analyzing the output from the output window.

        Run or backtest the script and when the output from the output window appears save this by right-clicking the output window and selecting Save As... -> give the output file a name and save -> then attach the output text file to your reply.

        Below is a link to a support article that demonstrates using informative prints to understand behavior and includes a link to a video recorded using the Strategy Builder to add prints.


        Let me know the date and time the behavior occurred or when you are expecting the behavior to occur.

        Please let me know if I may further assist with analyzing the output or if you need any assistance creating a print or enabling TraceOrders.​
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by clarocque1, Today, 06:18 PM
        0 responses
        2 views
        0 likes
        Last Post clarocque1  
        Started by clarocque1, Today, 06:17 PM
        0 responses
        2 views
        0 likes
        Last Post clarocque1  
        Started by clarocque1, 03-23-2025, 08:17 AM
        4 responses
        26 views
        0 likes
        Last Post clarocque1  
        Started by Artorias, Today, 05:22 PM
        0 responses
        9 views
        0 likes
        Last Post Artorias  
        Started by several, Today, 07:07 AM
        8 responses
        26 views
        0 likes
        Last Post several
        by several
         
        Working...
        X