Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Lag between the indicator and the price bars.

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

    Lag between the indicator and the price bars.

    Hello, I have problems when using the volumetric bars of orderflow in my codes, on many occasions there is a lag of my indicators with respect to the bars, it is like a desynchronization of the data, I have to clear the cache, reload historical data, etc. to be able to make all my graphs come out in order.

    Have you thought of a solution? I know many people this happens to them.

    It is important to note that this also happens with many native ninjatrader indicators.

    I'm talking about Ninjatrader 8

    #2
    Here I attach an image of what happens in these cases.

    You can see that there is a gap between the price bars and the indicators.


    Comment


      #3
      I am noticing some weird stuff similar to this with orderflow tradedetectors last few days. When in session, everything was fine. But when I close ninja and reopen and reloaded data, I have seen some weird misalign stuff with indicators. About to add a post of my own.

      Comment


        #4
        Hey not sure if it will help, but I just realized if you right click on the screen, there's an option "reload all historical data" near the bottom, that option fixed up some of my problem. Worth a try if you haven't tried it.

        Comment


          #5
          Hello ronyggg83,

          With the chart bars appearing on the chart, the tick data appears to be available.

          Is this a script you have created or one you have imported?

          If this is a script you have created, what specific values are not updating in the indicator?
          Use prints to debug. Below is a link to a forum post on using Print to understand behavior.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            flybuzz I do that constantly, most of the time it doesn't work, I have to manually delete the ninjatrader cache and then reload historical data, it's annoying, this error occurs on many occasions.

            NinjaTrader_ChelseaB It is a script created by me, but it is a data synchronization problem, this happens many times, I manage to solve it by reloading the historical data but it is annoying, it happens almost daily.

            No puedo send the script because it is protected.

            It's a ninjatrader problem, it happens to me even with only ninjatrader indicators like Emas etc.

            Thank you for your responses.

            Comment


              #7
              Hello ronyggg83,

              What data is missing? The chart bars are there. Is this a different data series added with AddDataSeries()?

              Have you used prints to debug and figure out what is not loading correctly?

              Can you show me a screenshot of a chart with only the EMA indicator loaded, and no other indicators, showing the issue?
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hi ChelseaB,

                No, it is an AddVolumetric(), I have already debugged it and it is a jump at the time of loading the data, it is not something that I am correcting, I can solve it only by clearing the data cache, even in some cases I must delete the files .sdf files that are created in the Documents/Ninjatrader 8/db/ folder.

                Attached I leave an image where the VPOC of the bar is loaded in an erroneous way:​​

                Click image for larger version

Name:	image.png
Views:	202
Size:	72.3 KB
ID:	1215936
                After clearing cache and reloading historical data, the data is synchronized and the error is corrected. Sometimes I have to do it many times in a row for this to work.
                Attached Files

                Comment


                  #9
                  Hello ronyggg83,

                  Thank you for confirming you are adding a second series with AddVolumetric().

                  This is sounding more like missing historical data as suspected. Especially now that we know you are calling a secondary series.

                  To confirm, if you open a chart with the volumetric bars first, there are no gaps on the chart, then after you add the indicator there are gaps in the data in the prints?
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Hi ChelseaB,

                    Thank you for your response and interest!

                    When this happens I have opened another chart without indicators and sometimes the bars are still out of phase, as I have mentioned there is a solution, but it is still annoying to have to reload one and many times until the historical data is synchronized, when there is a lot of volatility in the market , it is almost impossible to solve the problem, I have to leave and return when the volatility has decreased.​​

                    Comment


                      #11
                      Hello ronyggg83,

                      Any missing historical data should automatically be downloaded.

                      I recommend syncing the pc clock, then delete all historical data and let this download fresh.

                      Steps to sync the pc clock can be found below.


                      To remove the historical data:
                      • Click Tools -> Historical Data
                      • Right-click Historical -> select Delete
                      https://ninjatrader.com/support/help...HistoricalData
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        Hi ChelseaB Thank you once again,

                        Thanks for your suggestions.

                        The ideal is not to know how to solve the problem, the ideal is for it not to happen.

                        I know these steps, and I do them daily, my request is that you evaluate the way to prevent this from happening, it is quite annoying to have to do this over and over again, every day.

                        Also, is there a way to automatically remove this ants when opening ninjatrader? so that the data is downloaded every time you open ninjatrader?

                        Once again, thank you very much for responding.​

                        Comment


                          #13
                          Hello ronyggg83,

                          The platform is designed to download historical data for any open chart instruments when the connection to the data feed is established, or when opening or reloading the historical data on a chart.

                          May I confirm you are using 8.0.26.1?

                          After syncing the PC clock, clearing the historical data, and then connecting, the historical data does not automatically download?
                          Chelsea B.NinjaTrader Customer Service

                          Comment


                            #14
                            Hi ChelseaB,

                            Yes, I am using the latest version of Ninjatrader 8, if the historical data is reloaded when connecting the data, it always does, however, it seems that it is necessary to do this process manually so that the data is synchronized, when this problem has been presented , I have been able to print OHLC of the series of Bars in use and it does not coincide with the bars in the graph, the problem is precisely in the load of the Series used.

                            I'm using a translator, I don't speak Spanish.

                            Thanks again.​

                            Comment


                              #15
                              Hello ronyggg83,

                              Using prints is the right way to go.

                              May I have you provide a screenshot showing the output in the output showing the one print and the chart with the DataBox open and mouse hovered over the last bar?

                              What Calculate setting are you using?

                              May I confirm you are printing the bar information outside of any conditions?
                              Chelsea B.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by jclose, Today, 09:37 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post jclose
                              by jclose
                               
                              Started by WeyldFalcon, 08-07-2020, 06:13 AM
                              10 responses
                              1,413 views
                              0 likes
                              Last Post Traderontheroad  
                              Started by firefoxforum12, Today, 08:53 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post firefoxforum12  
                              Started by stafe, Today, 08:34 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post stafe
                              by stafe
                               
                              Started by sastrades, 01-31-2024, 10:19 PM
                              11 responses
                              169 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X