Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnMarketData never called when in MarketReplay mode

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

    OnMarketData never called when in MarketReplay mode

    I'm trying to test a strategy by replaying current or previous day data with the Market Replay tool.
    My data series is the ES with Tick Replay enabled.

    I can't seem to find a way to get the correct "current" tick value.
    I checked this forum and thought OnMarketData () would give me the current price, using this snippet:
    Code:
    if (e.MarketDataType == MarketDataType.Last) 
        Print("Last = " + e.Price + " " + e.Volume);
    But when I use the VS Debugger and place a breakpoint inside OnMarketData(), it NEVER gets called.

    I'm obviously missing something here.
    How can I get the current tick value when I run the replay mode, and how can I get onMarketData() to be called ?

    I can't seem to find the answer even after countless searches here.
    Really appreciate your help.

    #2
    Hello g49nep1f,

    Thank you for the post.

    I wanted to confirm, do you have TickReplay checked in the chart as well as the options menu? There are two settings, one in the options menu and then another for each individual chart or where the script is applied.

    Outside of this observation, are you seeing any prints at all? I wouldn't be able to use the VS debug info but we can address the problem by confirming if you are seeing any prints or not. If there are no prints that is sufficient to let me know the override was not called or that your print was not reached.

    To confirm other logic is not the problem have you tested using the print from the help guide specifically? Testing this print with no other custom logic would help to know if the override is being called and no other logic you may have is affecting the result: https://ninjatrader.com/support/help...sub=tickreplay

    The other item to check would be that you are connected to your data provider and to reload the historical data when you do this test.

    I look forward to being of further assistance.

    Comment


      #3
      Thanks Jessie,

      I reviewed all the steps you mentioned and my problem is fixed now.
      Thanks again for your help!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      50 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      126 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      69 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X