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

Behavior on delayed bar update

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

    #16
    Hi Jim,

    There is always data for the secondary bars. You can see the time slot 28/10/2021 15:01:00 to 15:10:01.
    Attached Files

    Comment


      #17
      Hello cliffhu,

      Do you see this behavior testing the indicator that I have attached?

      I am essentially printing the same thing, but this would give us a a common script to test with, so we can be sure there is not something else going on with your script.

      I've attached screenshots showing my results for a couple realtime prints as well.

      If you see issue with my test script, could you elaborate how the test is made? Please be as specific as possible (connection made, data provider, etc.)

      Attached Files
      JimNinjaTrader Customer Service

      Comment


        #18
        Hi Jim,

        My print was from the attached indicator when running within a strategy with same primary bars. My data provider is Kinetick.
        IndicatorVIXMTF.zip

        I will test your script on Monday when market is open.

        Comment


          #19
          Hi Jim,

          The issue is about when the indicator is running in a strategy. So I added your indicator in a simply strategy and got the same result as mine.

          Primary Timestamp: 01/11/2021 11:10:00 Secondary Timestamp: 01/11/2021 11:00:00 PC Clock: 01/11/2021 11:10:03
          Primary Timestamp: 01/11/2021 11:20:00 Secondary Timestamp: 01/11/2021 11:10:00 PC Clock: 01/11/2021 11:19:59
          Primary Timestamp: 01/11/2021 11:30:00 Secondary Timestamp: 01/11/2021 11:21:00 PC Clock: 01/11/2021 11:29:59

          I think data is not an issue here, as it always print the first or second bar in the 10 min interval.

          Comment


            #20
            Hello cliffhu,

            There are still details missing from the bigger picture regarding your issue. I have not reproduced the prints you mention.

            When I add the test indicator in a strategy, I see prints for the last ^VIX minute bar seen before the primary bar updates.
            • Do you see the behavior with this test strategy?
            • If not, can you modify the strategy and share an export of the strategy + indicator that demonstrates the behavior?
            • If you do see the behavior with this test strategy, do you see the behavior testing in a clean environment?
            If you see the issue in a clean environment, I likely will need to get connected on your PC to verify tests and gather more details. (Please then email me at scriptingsupport[at] ninjatrader [dot] com with the text "Attn Jim 3327422"

            Clean Environment Test

            Creating a clean environment can be done by following the steps below:
            1. Close NinjaTrader 8, and rename the "NinjaTrader 8" folder in My Documents to something like: "NinjaTrader 8 OLD" Do not delete this folder.
            2. Uninstall NinjaTrader from the Windows Control Panel
            3. Delete the C:\Program Files (x86)\NinjaTrader 8 folder
            4. Reinstall using the installer from http://ninjatrader.com/PlatformDirect
            5. Import the sttached strategy + indicator and test to reproduce the mentioned prints. Please follow up with your results.
            If you ever need to switch back to your original platform, you may do so by closing NinjaTrader and swapping the platform folder names.
            For example, Close NinjaTrader and rename the new "NinjaTrader 8" folder to "NinjaTrader 8 NEW" and the "NinjaTrader 8 OLD" folder to "NinjaTrader 8." Then restart the platform. Simply put: NinjaTrader 8 will always load the "NinjaTrader 8" folder in My Documents.



            Attached Files
            JimNinjaTrader Customer Service

            Comment


              #21
              Hi Jim,

              I got same issue in both current and clean environment. Please see the print.

              Just sent you the email for connecting to my PC.
              Attached Files

              Comment


                #22
                Hello Cliff,

                I have sent you a reply over email regarding how Update could be used to update the secondary data series.

                We are suggesting the following gets added to OnBarUpdate for cases like these. You may copy and paste the section below into the script in post #20 to test.

                Code:
                if (BarsInProgress == 1)
                {
                    indi.Update(indi.BarsArray[1].Count - 1, 1);
                }
                Last edited by NinjaTrader_Jim; 01-05-2022, 06:52 AM.
                JimNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Klaus Hengher, Yesterday, 03:13 AM
                2 responses
                15 views
                0 likes
                Last Post Klaus Hengher  
                Started by Sebastian - TwinPeaks, Yesterday, 01:31 PM
                2 responses
                13 views
                0 likes
                Last Post Sebastian - TwinPeaks  
                Started by wbennettjr, 07-15-2017, 05:07 PM
                16 responses
                2,531 views
                1 like
                Last Post eladlevi  
                Started by Human#102, Yesterday, 09:54 AM
                2 responses
                8 views
                0 likes
                Last Post Human#102  
                Started by Patlpp, 08-16-2021, 03:10 PM
                10 responses
                499 views
                0 likes
                Last Post Joerg
                by Joerg
                 
                Working...
                X