Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What are my options for testing with 1s data outside market hours?

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

    What are my options for testing with 1s data outside market hours?

    Questions

    1. How do I get simulation data from the Simulation Data Feed to show up on a chart when outside market hours?

    2. What are my options for testing an Add On that operates at the 1 second interval?

    3. Can I record 1s data from a testing session? Say if I am looking at AMD on a 1 second interval?


    For question 1, I have used the Simulation Data Feed to great effect during development, but I cannot figure out how to get the data to show up on the chart outside market hours, so I can actually see what the price is doing. As the data comes in, the numbers change on Chart Trader next to the chart, but I don't see any bars. What am I missing? Strangely, I DO see bars during normal market hours, even though it is simulation data. It would be enormously helpful to get this, since much of my development time is outside market hours.


    For question 2, my Add On examines data and executes orders on 1 second intervals. What testing options are available to me? I use TD Ameritrade as my back end (but could get Kinetick if I needed to). This is how I see it right now, but please correct me if I am wrong:


    Yes - Live testing with a simulation account during market hours.

    No - Backtesting with historical data. 1s data is unavailable from historical data

    No - Backtesting with market replays. 1s data is unavailable from market replays.


    For question 3, if I am watching an instrument during trading hours and watching 1s data roll by, is that all I need to do to "record" it? And now the data is in a database maintained by NT8? If that is so, is there a way to feed this 1s data into my Add On off hours somehow? I use Ask and Bid as well as Last.

    Thanks in advance for any help you can provide. Apologies for the length!


    #2
    Hello carnitron,

    How do I get simulation data from the Simulation Data Feed to show up on a chart when outside market hours?​
    Use the Default 24/7 Trading hours template.
    https://ninjatrader.com/support/help...riesParameters

    What are my options for testing an Add On that operates at the 1 second interval?
    By addon, you are specifically meaning a separate Addon window and not a NinjaScript Strategy, or you are meaning a NinjaScript Strategy?

    Either use a BarsRequest with a 1 second BarsPeriod object in an Addon or add a 1 second series with AddDataSeries() from a strategy.
    https://ninjatrader.com/support/help...arsrequest.htm
    https://ninjatrader.com/support/foru...208#post786208
    https://ninjatrader.com/support/help...dataseries.htm
    https://ninjatrader.com/support/help...inprogress.htm
    https://ninjatrader.com/support/help...ipt_strate.htm

    Can I record 1s data from a testing session? Say if I am looking at AMD on a 1 second interval?
    Second bars are comprised of tick data. You can enable Tools -> Options -> Market data -> 'Record live data as historical' if this is not already provided by your connected provider.
    https://ninjatrader.com/support/help...marketdata.htm
    https://ninjatrader.com/support/help...y_provider.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea. Thanks for the fast quick response and super clear answers.

      To answer your question, I am developing an Add On window, though technically I don't use the window part, lol. I want to operate across many different tickers at once, and an Add On seemed like the best practice for this. To be clear, I know how to observe 1s data in my code. That works. The question has been how to get the 1s data INTO my code during off hours.

      So to clarify part of your answer. The word "tick" is heavily overloaded in the trading domain. I have heard people use the term tick to refer to the minimum price increment for a given instrument, say 1 cent for stocks. I have also heard it be used to refer to trading data that is comprised only of buys and sells. I.e. a tick is a unit of time between the last trade for that instrument and the next one. This means it is a highly variable unit of time. (OTOH it is more efficient way of transmitting data if the price doesn't move much.)

      What exactly does tick mean in the NT8 context? Is 1s data comprised of ticks or is it the other way around? I'm currently of the impression that 1s data is comprised of ticks, and in the NT8 context, a tick is a single atomic piece of market data as it arrives exactly, typically on sub-second intervals. Is this correct?

      So tick data is like the fundamental low level data from which all bars are constructed or derived from.

      More to the point, I can use tick data even if I only care about 1s price movements, b/c the 1s price movements are built from the tick data. In other words I don't have to architect my code to consume and think in variable duration market events. Can you confirm that my view is accurate here?

      Thank you for the help!

      Comment


        #4
        Hello carnitron,

        Historical data comes in Tick, Minute, and Day. Historical Tick Data are the incoming last market updates recorded into a format that loads as historical data.

        Open a chart and set the Type to Tick and the Value to 1. These are the "ticks" saved in the historical data.

        These "ticks" are used to build a second bar.

        With the AddOn approach, the BarsRequest would be loading this Historical Tick Data.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Ok I think that covers it. Thank you so much, Chelsea. Cheers.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by fx.practic, 10-15-2013, 12:53 AM
          5 responses
          5,406 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Started by Shai Samuel, 07-02-2022, 02:46 PM
          4 responses
          98 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Started by DJ888, Yesterday, 10:57 PM
          0 responses
          8 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by MacDad, 02-25-2024, 11:48 PM
          7 responses
          160 views
          0 likes
          Last Post loganjarosz123  
          Started by Belfortbucks, Yesterday, 09:29 PM
          0 responses
          9 views
          0 likes
          Last Post Belfortbucks  
          Working...
          X