Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnMarketData unsubscribe

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

    OnMarketData unsubscribe

    I´ve made indicator which uses OnMarketData() data stream. Everything works fine but when I load indicator on historical data (e.g. Monday (1day) from previous week) with TickReplay and the instrument is live by that time, OnMarketData starts to send updates which ofc disrupts visual of the indicator. How can I prevent this from happening? Thank you


    EDIT:
    Question 2: Lets say I dont need bid/ask, only "precise" volume at price (historical and realtime). So if I use TickReplay or add 1 tick DataSeries, result is the same. What are the pros and cons of using these approaches?
    Last edited by Marty125; 12-10-2024, 11:22 AM.

    #2
    Hello Marty125,

    I am not sure I understand the problem, are you saying that OnMarketData is somehow being called for both historical and realtime bars at the same time? When you use tick replay that makes OnMarketData call for historical data.

    If you can accomplish the same task without tick replay that will be more efficient, TickReplay takes a lot more resources to process.
    JesseNinjaTrader Customer Service

    Comment


      #3
      If you can accomplish the same task without tick replay that will be more efficient, TickReplay takes a lot more resources to process.
      I thought that 1tick data will use more resources bc there can be hundreds of thousands ticks per day. Ok, thats good news.


      ​​

      Q1: This is 15min ES (5. dec 2024, days to load 0). When open this chart (and now the ES is open) there are ticks comming from OnMarketData.


      Click image for larger version

Name:	fssdfdsf.png
Views:	36
Size:	66.4 KB
ID:	1327207

      Comment


        #4
        Hello Marty125,

        I am unsure of what your question is for the image, you should have live market data happening in OnMarketData if the script enters realtime and you are connected.
        JesseNinjaTrader Customer Service

        Comment


          #5
          The upper part is last 15min footprint from 5.dec (22:45-23:00). When I load this chart NOW, new ticks starts to come from OnMarketData, which creates the lower part of FP. Because OnBarUpdate is ofc not beeing caled no new candles are being created. Is there any condition which I might be missing from OnMarketData to prevent this new ticks from incoming?

          Comment


            #6
            Hello Marty125,

            That still sounds correct, OnMarketData is a separate override from OnBarUpdate, market data does not require OnBarUpdate to be called. Those two overrides happen independently in realtime so if you are waiting for a bar to close to do something OnMarketData will be working during that time.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by shepherdangelique, Today, 07:27 PM
            0 responses
            5 views
            0 likes
            Last Post shepherdangelique  
            Started by kvakana, Today, 03:38 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by burtoninlondon, 09-16-2021, 10:11 AM
            13 responses
            1,735 views
            1 like
            Last Post Bullero
            by Bullero
             
            Started by emiferariz, Today, 04:44 PM
            0 responses
            7 views
            0 likes
            Last Post emiferariz  
            Started by Kraken29, Today, 04:16 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Working...
            X