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

LastPlayback not building bars correctly?

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

    LastPlayback not building bars correctly?

    When I run this code only the first and last rows are shown on the daily chart. See attached image.

    cli.LastPlayback(ticker, 102, 1, "20200108100000");
    cli.LastPlayback(ticker, 110, 1, "20200108100100");
    cli.LastPlayback(ticker, 100, 1, "20200108100200");
    cli.LastPlayback(ticker, 105, 1, "20200108100300");

    There is only one bar on the chart.
    Volume is 2 but should be 4 I guess.

    #2
    Hello ellefk,

    I will look into this and I will let you know what I find.

    I appreciate your patience.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello ellefk,

      I am not able to reproduce this behavior.

      Below is a link to a video of the test.


      Are you testing using the example application I've posted?
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        I have now tested with the example application you have posted.


        I works, but when I increment the difference between the prices it starts to ignore some of the prices.

        I changed the formula used to calculate the price from

        10 + i * 0.01

        to

        10 + i * 0.5

        for (int i = 0; i < 5; i++)
        {
        myClient.LastPlayback(instrumentSend, 10 + i * 0.5, 1, dt.AddSeconds(i).ToString("yyyyMMddHHmmss"));
        }



        In this example only 10.00 and 11.50 was shown the chart

        When I put the code in my first post into the example application it works the same way as I described in the post.
        Only the first and last rows are shown in the chart.


        Comment


          #5
          Hello ellefk,

          Are the prices you are sending at an exact tick size?

          The example I've provided uses a loop and increments the value. Without modifying the example I've created, I am still not able to reproduce this behavior.

          Is the unmodified original example I have provided sending updates that are incremented in a loop, that you can see in the output, not appearing on the chart?
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            In the attached file is the chart I get when I run the program: Ninja8API\NinjaTraderClient\bin\x64\Debug\NinjaTra derClient.exe from the unmodified original example.
            I guess there should have been more ticks for 1.00 and 1.01?
            I use 64 bits Windows 10.
            Attached Files

            Comment


              #7
              Hello ellefk,

              You may have Live selected which uses the Last() method and not Historical which uses LastPlayback().

              Are you using 8.0.20.1?

              Is everything else closed?

              Do you have another computer to test on?

              Below is a link to a video of how this is working on my end.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                I forgot to mention that I checked the Live radio button so the prgroam used the Last function and not LastPlayback.

                Comment


                  #9
                  I used the Live selection.
                  I use version 8.0.20.1.
                  I use the free version of NinjTrader.
                  Everything else is closed.
                  I do not have another computer to test on.
                  I live in Europe so it is a different time zone and different decimal symbol (i have tried with bot comma and period).

                  When I select Historical insted of Live I think it works. I looks like the problem occurs when the price is lower than the previous.
                  I have tested both the NTDirect and NinjaTraderClient versions.
                  I have started to instances of the program and used one as receiever and one as sender.
                  Then I can se in the log that 1.00 and 1.01 are sendt but not received.

                  I am a computer programmer myself so I know it is hard to debug when you can not reproduce the behavior.
                  Is there anything I can do to try to make this work on my computer?

                  Comment


                    #10
                    Hello ellefk,

                    Do you want to pivot and inquire about the Last() method?

                    I've tested using the Live selection on the example app on 3 different computers and I am not able to reproduce.

                    Do you have a friend or colleague you can borrow a computer from to test for a moment?

                    It would be helpful to know if its an issue with the specific computer (such as regional settings or possibly something else I am not thinking of).

                    (May I confirm that NT7 is closed and that only one instance of NT8 is open?)
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11

                      Do you want to pivot and inquire about the Last() method? Both methods seems to have the same problem

                      Do you have a friend or colleague you can borrow a computer from to test for a moment? No

                      (May I confirm that NT7 is closed and that only one instance of NT8 is open?) I do not have NT7 installed and only one instace of NT is open.

                      Comment


                        #12
                        Hello ellefk,

                        Below is a link to a video of testing the Live selection with the Last() method.


                        As I have tested multiple computers and I am not able to reproduce, this lets us know that likely there is not a bug in the programming of the NinjaTrader platform and possibly the issue is with the computer you are using.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          In the Options windows, under Market data / Real-time there is an option "Filter bad ticks", that is checked by default. This caused the ticks to be filtered out.

                          Comment


                            #14
                            Hello ellefk,

                            The Tools > Options > Market Data > Filter bad ticks setting is not checked or enabled by default. This does need to be manually checked to be turned on and when enabled can affect all connected connections.
                            Chelsea B.NinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by bmartz, Today, 09:30 AM
                            2 responses
                            11 views
                            0 likes
                            Last Post bltdavid  
                            Started by f.saeidi, Today, 11:02 AM
                            1 response
                            3 views
                            0 likes
                            Last Post NinjaTrader_BrandonH  
                            Started by geotrades1, Today, 10:02 AM
                            4 responses
                            12 views
                            0 likes
                            Last Post geotrades1  
                            Started by rajendrasubedi2023, Today, 09:50 AM
                            3 responses
                            16 views
                            0 likes
                            Last Post NinjaTrader_BrandonH  
                            Started by lorem, Today, 09:18 AM
                            2 responses
                            11 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Working...
                            X