Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SampleStreamWriter Max Bars Limit?

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

    SampleStreamWriter Max Bars Limit?

    In NT7 I added the SampleStreamWriter indicator to an ^SPX daily chart. But if the "Days to load" parameter is >119, the MyTestFile.txt data stops before the last bar on the chart. Why?

    #2
    Hello ScorpioTravis,

    Thanks for your post.

    That would be because the last daily bar on the chart has not closed and the indicator works with Calculate.OnBarClose = true.

    Comment


      #3
      Originally posted by NinjaTrader_PaulH View Post
      Hello ScorpioTravis,

      Thanks for your post.

      That would be because the last daily bar on the chart has not closed and the indicator works with Calculate.OnBarClose = true.
      Thank you for your reply, but it doesn't make any difference.

      Comment


        #4
        Hello ScorpioTravis,

        Thanks for your reply.

        You would need to wait for some time after the day session ends.

        Alternately you could change to Calculate.OnEachTick and you should get today's bar.

        Comment


          #5
          Originally posted by NinjaTrader_PaulH View Post
          Hello ScorpioTravis,

          Thanks for your reply.

          You would need to wait for some time after the day session ends.

          Alternately you could change to Calculate.OnEachTick and you should get today's bar.
          I set Days to load = 200 and End date = 8/19/2021. The text file last line is:

          20210621 4173.4 4226.24 4173.4 4224.79
          20210622 4

          Comment


            #6
            Hello ScorpioTravis,

            Thanks for your reply.

            What data feed are you connected to?

            What specific version of NinjaTrader7 are you using (Look under Help>About, (top line in the about window)).

            Have tried any other instruments, such as ES 09-21?

            Comment


              #7
              Originally posted by NinjaTrader_PaulH View Post
              Hello ScorpioTravis,

              Thanks for your reply.

              What data feed are you connected to?

              What specific version of NinjaTrader7 are you using (Look under Help>About, (top line in the about window)).

              Have tried any other instruments, such as ES 09-21?
              Kinetic End Of Day
              7.0.1000.42
              No

              Comment


                #8
                Hello ScorpioTravis,

                Thanks for your post.

                Please post a screenshot of the ^SPX daily chart that you see. Please include the entire chart window so the instrument name, time base, and price scale are visible.


                For a screenshot with Windows 8 or newer I would recommend using the Windows Snipping Tool.

                Click here for instructions

                Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

                Click here for detailed instruction


                Thanks in advance.

                Comment


                  #9
                  JPG and TXT files attached Click image for larger version

Name:	SPXDaily200.jpg
Views:	264
Size:	112.1 KB
ID:	1168745

                  Comment


                    #10
                    Hello ScorpioTravis,

                    Thanks for your reply.

                    I don't have access to the ^SPX so I could not replicate your efforts. I did test with ES 09-21 and would ask that you try with that instrument.

                    Just to show you the sequence I used, please see: https://Paul-ninjaTrader.tinytake.co...NF8xNzcyODg5Ng

                    Note: In the video, I asked for 125 bars in the data series, which included today's bar but today's bar has not yet closed on the end of day data feed so only 124 were pulled.

                    Comment


                      #11
                      Originally posted by NinjaTrader_PaulH View Post
                      Hello ScorpioTravis,

                      Thanks for your reply.

                      I don't have access to the ^SPX so I could not replicate your efforts. I did test with ES 09-21 and would ask that you try with that instrument.
                      I don't understand how you don't have access to ^SPX when it's free to NT users. Regardless, I changed the same chart to ES 09-21, and the same thing happens. Here's the chart and the file.

                      Attached Files

                      Comment


                        #12
                        Hello ScorpioTravis,

                        Thanks for your reply.

                        The text file you present has multiple datas meaning that you are not deleting (or renaming) the file after each use. The data will keep being added on for each run.

                        Please recreate what I am showing in the video, please follow the same steps as I show.

                        1) Remove or delete or verify that the file Documents>Ninjatrader7>MyTestFile.txt does not exist.
                        2) Create the chart with a specific number of bars, by changing days to load to Bars and then entering the value.
                        3) Apply the indicator and set the Calculate on Bar close to "False".
                        4) Wait for a period of time (same time as I waited in the video should be enough) so that the file can be written.
                        5) Remove the indicator from the chart as this will close the text file.
                        6) Open and view the text file.



                        Comment


                          #13
                          Originally posted by NinjaTrader_PaulH View Post
                          Hello ScorpioTravis,

                          Thanks for your reply.

                          The text file you present has multiple datas meaning that you are not deleting (or renaming) the file after each use. The data will keep being added on for each run.

                          Please recreate what I am showing in the video, please follow the same steps as I show.
                          SUCCESS! I followed the steps on both ES 09-21 and ^SPX and it worked as expected.

                          Thank you for your help and patience.

                          However, I noticed in your first reply:

                          That would be because the last daily bar on the chart has not closed and the indicator works with Calculate.OnBarClose = true.

                          But in the instructions:

                          3) Apply the indicator and set the Calculate on Bar close to "False".

                          Thanks again!

                          Comment


                            #14
                            Hello ScorpioTravis,

                            Thanks for your reply, glad to hear of your success.

                            Actually, it should work the same either way (true or false) as you are working with end of day data.

                            Comment


                              #15
                              Originally posted by NinjaTrader_PaulH View Post
                              Hello ScorpioTravis,
                              Can you provide a link to an explanation for adding an indicator and its values to the output text file? I have a pretty good idea of how to, but I want to be sure.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              566 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              330 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              101 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              547 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              548 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X