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

Incorrect opening price

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

    Incorrect opening price

    Hi,

    I noticed that on market replay data NT7, CurrentDayOHL().CurrentOpen[0]; returns previous close instead of today's open. I added CurrentDayOHL on a chart, and the problem seems to be that the first bar of each session being built not from Open, but from previous Close. I attached TSLA 10/26/2017 where the yellow line (current open) indicates 325.84 (previous day closing price) instead of correct 327.78. Is there any way to fix it? Than you.

    Dmitry
    Attached Files

    #2
    Hello dmitry75,

    Thanks for opening the thread.

    We do not have Market Replay Data available for TSLA so I cannot test the exact same scenario as you are.

    However, when I look at your chart, I see that the gold dotted line of the CurrentOpen plot at 325.84 matches with the open of the first bar of the session in your data series. The indicator looks like it is working correctly.

    Could you check your Data Series parameters and make sure you do not have a conflicting Session Template assigned?

    If you are able to reproduce this with another instrument which has Market Replay Data on our servers, could you let me know which instrument and interval you used so we can take a look together?

    I look forward to being of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hello Jim,

      Exactly, the yellow line matches with the Open at 325.84. The problem is that today’s Open was 327.78, not 325.84 (this was yesterday’s Close) I attached another image showing eSignal and NinjaTrader’s charts together. Please take a look at the first bar of each chart. As you can see, NinjaTrader's first bar starts at 326.84, although today’s Open was 327.78.

      I have been recording replay data for a couple of days and experience same problem every day, and not only with TSLA but with other stocks and ETFs (including SPY).

      Not sure what do you mean by “conflicting Session Template assigned.” Could you please clarify?

      Thank you.
      Attached Files

      Comment


        #4
        Hello dmitry75,

        Thanks for providing that detail. I meant to check the session template being used to see if that was effecting the data series and thus changing the opening bar.

        So we can look into the data issue more, could you let me know if you are seeing the same issue with those instruments using a real time data feed?

        Also, who is your data provider? Are you using eSginal for NinjaTrader as well?

        I look forward to your reply.
        JimNinjaTrader Customer Service

        Comment


          #5
          Hello Jim,

          Thank you for your response. I use “Instrument Settings” default session template, latest NinjaTrader 7 release and eSignal as data provider. Because of NinjaTrader 7, I cannot download data from your server and have to record by myself. Unfortunately, I cannot tell you for sure whether the problem exists with real time data feed (I noticed it only yesterday and never paid attention before), but I’ll let you know on Monday.

          However, there is another interesting piece of information.

          Today I started recording replay data strictly 10 seconds after 10:10 AM, and it didn’t display yesterday’s Close as opening price. However, NinjaTrader 7 Replay shows me today starting time as 10:09:33AM (almost a minute before I started recording, and I deliberately waited and connected NinjaTrader to eSignal only after 10:10 AM). Maybe the problem lies in difference of how NinjaTrader and eSignal build bars (please see https://ninjatrader.com/support/foru...d.php?t=2576)? It’s really looks like when I start recording eSignal data at 9:30 AM, NinjaTrader looks back and somehow catches previous day’s Close to build its first bar.

          I would really appreciate your help in solving this.

          Thanks again.

          Comment


            #6
            Hello dmitry75,

            The difference in bar formations between eSginal and NinjaTrader could cause a different value to be noted for that bar/timestamp and could explain a viewing difference between the two platforms. Further differences in bar formations can be referenced here: https://ninjatrader.com/support/help..._are_built.htm

            I am still curious about how you had started recording data after a certain time and received a timestamp before the time you started recording. I have taken the same steps in a test and have made a short video discussing the results I got.

            Demo: https://www.screencast.com/t/xJJ8UzralKmc

            I'd like you to perform a similar test on your end after clearing any Market Replay data you have for one instrument you would like to test with and making sure your PC clock is synchronized.

            Market Replay Data is stored under the "Documents\NinjaTrader 7\db\data" folder in .ntm files for each day of Market Replay data recorded. Please make sure the instrument you are testing with has this data cleared.

            The following instructions can be used to resync the PC clock:
            Close NinjaTrader.
            Open the Windows Control Panel
            Select Date and Time
            Press 'Change time zone...'.
            Set the time zone and press 'OK'.
            Click on Internet Time tab.
            Set the server to time.nist.gov and then click Update.
            Ensure to check for a message under the Update button that says it was successful.
            If it did not properly sync, even after a few tries, try manually setting your PC clock and then syncing.
            I look forward to looking into this matter further with you.
            JimNinjaTrader Customer Service

            Comment


              #7
              Hello Jim,

              Thank you for recording a video. I made a few experiments and found out that the problem appears when I’m recording replay data using Market Analyzer (that is when I add symbols on it) without opening charts. If the chart for a particular instrument is open (even if I open the chart later, at any time during the session) – the replay data for this instrument is good. If the chart was never opened during the session, the replay data will display previous Close at today’s opening price. Also, I’m using eSignal 12 with NT7 (the combination which is not officially supported, so maybe this is somehow causing a problem).

              For me, the problem is solved; but maybe it makes sense for your developers to take a look at it, though.

              Thanks for your time.

              Comment


                #8
                Hello dmitry75,

                Thanks for writing back.

                I'm able to reproduce the same behavior that you are seeing when you record market replay data from the Market Analyzer without starting before the beginning of the session. The previous day's open value is then substituted.

                I would consider this to be more of a an issue with the data set rather than the indicator. NinjaTrader 7 is also in a freeze so it is not likely that this will be changed. Nonetheless, I will create an internal note tracking this scenario. As I see for NinjaTrader 8, the first bar is used to create the open even if I use the Market Analyzer as my window for receiving data from my provider.

                If there is anything else I can do to assist you further, please let me know.
                JimNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by aa731, Today, 02:54 AM
                0 responses
                4 views
                0 likes
                Last Post aa731
                by aa731
                 
                Started by thanajo, 05-04-2021, 02:11 AM
                3 responses
                470 views
                0 likes
                Last Post tradingnasdaqprueba  
                Started by Christopher_R, Today, 12:29 AM
                0 responses
                10 views
                0 likes
                Last Post Christopher_R  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,237 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                5 views
                0 likes
                Last Post thread
                by thread
                 
                Working...
                X