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

Property 'IsTickReplay' and Playback with Market Replay

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

    Property 'IsTickReplay' and Playback with Market Replay

    Hello!

    I'm testing a custom order flow indicator in Playback with Market Replay data and try to separate the logic for real time data and Replay data in OnMarketUpdate(). I thought I could use the property Bars.IsTickReplay, but it seems to be == false for Market Replay data (unless you tick the box 'isTickReplay' on the Data Series properties.) Is there a way to check if the chart is run by real time data or Market Replay data?

    /poseidon_sthlm

    #2
    Originally posted by poseidon_sthlm View Post
    I'm testing a custom order flow indicator in Playback with Market Replay data and try to separate the logic for real time data and Replay data in OnMarketUpdate(). I thought I could use the property Bars.IsTickReplay, but it seems to be == false for Market Replay data (unless you tick the box 'isTickReplay' on the Data Series properties.) Is there a way to check if the chart is run by real time data or Market Replay data?
    Take a look at Connection and ConnectOptions.

    Perhaps one of the various name properties will identify
    the Connection as a 'Market Replay' connection.

    Comment


      #3
      Hello poseidon_sthlm,

      You can check if connected to playback with:
      Code:
      if (Cbi.Connection.PlaybackConnection != null)
      You can check between real-time and historical from the State property.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Thanks for the advice on using 'Connection' to check if connected to playback.

        When I'm running my script connected to PlayBack, then Bars.IsTickReplay == false and State == Realtime for MarketReplay as well as Historical data. Is this expected?

        I recall that my script did work as expected a few years ago. So I wonder if it is correct that Bars.IsTickReplay == false when I run my script in PlayBack with MarketReplay data?
        Last edited by poseidon_sthlm; 07-26-2021, 06:04 AM.

        Comment


          #5
          Hello poseidon_sthlm,

          It would be expected that Bars.IsTickReplay is true if Tick replay is enabled in the Data Series window. It will be false if this is not enabled.


          Tick replay only affects historical data. Playback does not enable this automatically. Using Market Replay for real-time data, which is not historical data, also does not enable this.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Ok, thanks for the video. Much appreciated! This is what I also see when I'm testing my script.

            I still would like to separate the logic in my script for PlayBack with Market Replay data versus PlayBack with Historical data. Can this be done?

            Comment


              #7
              Hello poseidon_sthlm,

              Historical data will load and process before the playback starts.

              If you are asking about the playback data type, I'm not aware of a way to detect this.
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by owen5819, Today, 02:24 PM
              0 responses
              6 views
              0 likes
              Last Post owen5819  
              Started by OllieFeraher, 05-09-2024, 11:14 AM
              4 responses
              14 views
              0 likes
              Last Post MisterTee  
              Started by dcriador, Today, 12:06 PM
              0 responses
              10 views
              0 likes
              Last Post dcriador  
              Started by dcriador, Today, 12:04 PM
              0 responses
              7 views
              0 likes
              Last Post dcriador  
              Started by cutzpr, Today, 08:54 AM
              0 responses
              11 views
              0 likes
              Last Post cutzpr
              by cutzpr
               
              Working...
              X