Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8.0.5.0 AddDataSeries - TradingSession not respected on restart

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

    NT8.0.5.0 AddDataSeries - TradingSession not respected on restart

    Instrument ES, Trading Hours 24x7
    Instrument ^VIX, Trading Hours, US Equities RTH or CME Index RTH

    Connect to Playback-MR.

    Add strategy1.cs to ES 03-17 chart (30 seconds).

    Run replay - no prints happen until 10:34:30, 20 bars of 3 minutes VIX. Expected. PASS.
    Code:
    Enabling NinjaScript strategy 'Strategy1/100320157' : On starting a real-time strategy - StartBehavior=WaitUntilFlat EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=True / triggering 30 seconds before close SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes
    RTH 20 103430 VIX SMA(14)=11.99 ES=2341  ES SMA(14)=2341.5
    RTH 20 103445 VIX SMA(14)=11.99 ES=2341  ES SMA(14)=2341.5
    RTH 20 103500 VIX SMA(14)=11.99 ES=2341.5  ES SMA(14)=2341.25
    RTH 20 103515 VIX SMA(14)=11.99 ES=2341  ES SMA(14)=2341.25
    Disable strategy. Do NOT REMOVE.

    Exit/Save Workspace.

    Start NT8.

    Connect to playback-MR.

    Enabled Strategy in Control Center.

    Secondary Series is now on 24x7 (maybe from ES?), as it starts 04:23:00 AM, so it's not respecting/lost the instrument default trading hours.

    Code:
    Enabling NinjaScript strategy 'Strategy1/100320157' : On starting a real-time strategy - StartBehavior=WaitUntilFlat EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=True / triggering 30 seconds before close SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes
    RTH 20 42300 VIX SMA(14)=11.89 ES=2340.75  ES SMA(14)=2341
    RTH 20 42315 VIX SMA(14)=11.89 ES=2341  ES SMA(14)=2341
    RTH 20 42330 VIX SMA(14)=11.89 ES=2340.75  ES SMA(14)=2341
    RTH 20 42345 VIX SMA(14)=11.89 ES=2340.75  ES SMA(14)=2341
    RTH 20 42400 VIX SMA(14)=11.89 ES=2340.5  ES SMA(14)=2341

    ----

    Okay - interesting - ran 1 more test to isolate if it is a control center thing or restart thing.
    Looks to be a control center thing.

    New NT8 session.

    Connect to playback-MR.

    Add strategy1.cs to control center.

    ES 03-17, 30 seconds,trading hours-use instrument settings...

    VIX is set to 24x7.

    Code:
    Enabling NinjaScript strategy 'Strategy1/100321454' : On starting a real-time strategy - StartBehavior=WaitUntilFlat EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=True / triggering 30 seconds before close SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes
    RTH 20 42300 VIX SMA(14)=11.89 ES=2341  ES SMA(14)=2341
    RTH 20 42330 VIX SMA(14)=11.89 ES=2340.75  ES SMA(14)=2341
    RTH 20 42400 VIX SMA(14)=11.89 ES=2340.5  ES SMA(14)=2341
    RTH 20 42430 VIX SMA(14)=11.89 ES=2340.5  ES SMA(14)=2341
    RTH 21 42500 VIX SMA(14)=11.9 ES=2341  ES SMA(14)=2341
    Resetting the slider on Playback-MR it's behaving as expected (VIX is now back to RTH hours, and print happens 10:34:30 AM).


    Something isn't being set right in these situations.
    Attached Files

    #2
    Thank you for this report sledge. While this will likely not affect the test, can you let us know which day and date you saw this for? Also for the sake of completeness, since this will affect the test but there is a likely answer, have you done anything to set the VIX trading hours manually, or are we assuming the US Equities RTH is the first used from the output data and the instrument settings?

    I am reviewing this and will return shortly with my findings.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      RTH should be default Vix setting.
      I should never see a print outside of rth hours since the should be no bars.

      Comment


        #4
        Thanks for confirming we are using the default trading hours. Can you also confirm the day you downloaded market replay data for and the hours you were testing inside Market Replay? If we could confirm your time zone as well it would be appreciated.
        Last edited by NinjaTrader_JessicaP; 03-07-2017, 12:08 PM.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Would it also be possible, since Market Replay data for the VIX is not available, for you to send the historical data on your system for the VIX for testing? If you would prefer not sending it through the forums it may be sent to platformsupport[at]ninjatrader[dot]com referencing Attn:NinjaTrader_JessicaP and 1672269 in the subject line.
          Jessica P.NinjaTrader Customer Service

          Comment


            #6
            For today's testing I will be using two futures, ES and TF on the 06-17 expiries. Since it may be the case that stocks and indexes like the ^VIX are treated differently I will be recording AAPL and ^VIX data for testing tomorrow. I will return to the thread on Thursday with this information whether my testing today is conclusive or not.
            Jessica P.NinjaTrader Customer Service

            Comment


              #7
              Hello Sledge,

              I have more information. This is an expected behavior. If you run the attached script, you will see that the second data series' trading hours are always printed out as being instrument defaults. I would encourage you to try this attached script with the ^VIX instead of the TF on your end.

              The difference is caused by the initial session starting in a different place, but this different place is predictable.

              For example, when I set my computer's clock and NinjaTrader to UTC, and fast-forward to 23:01 on the 7th of March using replay data for 06 March 2017, then create and start a strategy, I see this,

              Code:
              [FONT=Courier New]
              Bar and time 60 230100
              Trading Hours Ipe Europe Futures
              TF SMA(14)=1382.5
              ES=2367.75
              ES SMA(14)=2368.25[/FONT]
              This indicates that we started counting from 22:00. When I disable, save my workspace, and restart, I get this instead,

              Code:
              [FONT=Courier New]
              Bar and time 60 220000
              Trading Hours Ipe Europe Futures
              TF SMA(14)=1382.5
              ES=2368.25
              ES SMA(14)=2368.5[/FONT]
              This indicates that we started counting from 21:00 . For reference, yesterday's IPE Europe trading hours for the TF were midnight - 23:00, and yesterday's CME US Index Futures ETH for the ES were midnight - 21:00 and 23:00 to midnight.

              If we then remove the strategy from the strategies tab, fast-forward to 23:45, and re-add the strategy, we will find it does not print, as expected.

              Because NinjaScript and the UI does not let you specify an exact time of day to backload your historical strategy data to, and more importantly, because turning on any script counts the turn-on time as a session boundary already, any change to this behavior will have to be treated as a feature request, and we have some latitude as to how we would prefer this working.
              Attached Files
              Last edited by NinjaTrader_JessicaP; 03-07-2017, 02:22 PM.
              Jessica P.NinjaTrader Customer Service

              Comment


                #8
                I'll have to make a video tonight.

                Comment


                  #9
                  Originally posted by NinjaTrader_JessicaP View Post
                  For today's testing I will be using two futures, ES and TF on the 06-17 expiries. Since it may be the case that stocks and indexes like the ^VIX are treated differently I will be recording AAPL and ^VIX data for testing tomorrow. I will return to the thread on Thursday with this information whether my testing today is conclusive or not.
                  Here is the video:

                  Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.

                  Comment


                    #10
                    Thank you for providing this video, I believe we are on the same page.

                    Please review and then run the attached script. Please let us know if this script ever reports OBU loading for the secondary data series outside US Equities RTH.

                    The attached script will let us distinguish the situation where bars from a previous session were loaded, from the situation where the second data series actually receives data from outside hours. It is my understanding from the testing on my end that the behavior we observed results from the original script, whose logic I commented out, working as designed.

                    Should there be any errors with the test in this post, or should it not test the situation we are interested in, or if there is anything else you can clarify, it would be appreciated. We are happy to answer any other questions that we can.
                    Attached Files
                    Jessica P.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_JessicaP View Post
                      Should there be any errors with the test in this post, or should it not test the situation we are interested in, or if there is anything else you can clarify, it would be appreciated. We are happy to answer any other questions that we can.
                      Added strategy to control center. Start at 4:23 AM.



                      RTH 20 42300 VIX SMA(14)=11.89 ES=2340.75 ES SMA(14)=2341 CME US Index Futures RTH
                      During BarsInProgress 0, the most recent ^VIX bar is 20, and occurred at 17 Feb 2017 04:21:00.0000 which should be within the 'CME US Index Futures RTH' trading hours
                      RTH 20 42400 VIX SMA(14)=11.89 ES=2340.5 ES SMA(14)=2341 CME US Index Futures RTH
                      Reset Playback MR slider and play again, and we DO NOT start until 20 bars in.

                      Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.

                      Comment


                        #12
                        Hello Sledge,

                        I am preparing a report on this thread to send to the development team. I was able to confirm what you were seeing on my end. So that I may include your videos directly, I would like to ask,

                        • What time zone is your PC clock set to
                        • What time zone is your NinjaTrader's Tools -> Options -> General set to?

                        Thank you once more for your report.
                        Jessica P.NinjaTrader Customer Service

                        Comment


                          #13
                          Sledge - I have seen issues with AddDataSeries data which is basically visually hidden but makes its presents ( or lack of ) known thru indicators. For the most part doing One or Two reloads corrects the issue and I am off and running, However when I get to using Strategies this will be an issue.

                          Thank you for doing this.

                          Comment


                            #14
                            We appreciate your time is valuable. Unfortunately when we reviewed our test case, no actual prints could be made to occur outside of trading hours from a bars series that trades during these hours.

                            With future reports please set your computer's clock and NinjaTrader to UTC.
                            Jessica P.NinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_JessicaP View Post

                              With future reports please set your computer's clock and NinjaTrader to UTC.
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Skifree, Today, 03:41 AM
                              3 responses
                              12 views
                              0 likes
                              Last Post Skifree
                              by Skifree
                               
                              Started by traderqz, Yesterday, 09:06 AM
                              5 responses
                              32 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by guillembm, Today, 11:25 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by owensd, 04-21-2024, 11:34 PM
                              9 responses
                              34 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by trilliantrader, 04-10-2024, 09:33 PM
                              7 responses
                              25 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Working...
                              X