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

Put computer to sleep during weekend

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

    Put computer to sleep during weekend

    I am running swing trading strategy that may not exit positions before the weekend. In order to rest the PC and save some energy, I am thinking of putting computer to sleep (run scheduled task 10 minutes after market close).

    Would that in any case interfere/corrupt my current position (and it's synchronization)? May guess is NO, but I need confirmation.

    #2
    Hello UltraNIX,

    Thanks for your post.

    If you are outside of trading hours there should not be an issue as long as you re-enable before trading hours resume.

    Please note that in general, we do not recommend sleep modes and always recommend disabling them because if the computer goes to sleep when there is active trading, it might not be able to handle your position.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PaulH View Post
      Hello UltraNIX,

      Thanks for your post.

      If you are outside of trading hours there should not be an issue as long as you re-enable before trading hours resume.

      Please note that in general, we do not recommend sleep modes and always recommend disabling them because if the computer goes to sleep when there is active trading, it might not be able to handle your position.
      Thanks, yes, it's only over the weekend and not during active trading hours.

      Comment


        #4
        by the way, another swing trading with automated strategies question. Let's say strategy is running when ES futures rollover (nearest in December). Will I be forced to close open positions? (I heard somewhere that there are penalties for trading "outdated" futures). Or, even better, is it possible to implement a code into a strategy to deal with roll over, because, as I've experienced, when rollover happens, "outdated" contract has much less volume than new contract.

        Comment


          #5
          Hello UltraNix,

          Thanks for your reply.

          Please note that the additional question does not relate to the topic title of "Put computer to sleep during weekend". We ask that going forward if you have a new topic question that you create a new topic as this will help others when they search the forums for the same or similar interest. Thanks for your understanding.

          For rollover, no your position is not rolled over, at some point prior to the close of the current contract you would need to close your position, and if you wish open a position in the new contract. Roll over of the instrument typically occurs two weeks prior to when the contract is no longer traded, however, you are not required to rollover on the rollover date and can roll over when you wish after the rollover date in NinjaTrader but obviously before the end of trading date.

          In a strategy, you can certainly code in an exit on a certain date.



          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Hello UltraNIX,

            I had meant to advise you about two other options that can help with rollover observation or rollover itself.

            In the Market analyzer, you can add a column called "DaysUntilRollover" which is helpful if you are looking at a number of instruments that may have different rollover dates.

            On the chart you could add an indicator from the Nt User Apps written by my colleague Chelsea that provides:

            "Shows a button on the chart to roll the expiry to the next available contract month. Option to hide button until a number of days before or on roll date. Another option to confirm by opening the instrument overlay selector or automatically rollover without confirmation."

            This indicator is publicly available on our NinjaTrader Ecosystem website:
            Here is a basic guideline of how to import NinjaScript add-ons in NinjaTrader 8:

            Note — To import NinjaScripts you will need the original .zip file.

            To Import:
            1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
            2. From the Control Center window select the menu Tools > Import > NinjaScript Add-on...
            3. Select the downloaded .zip file
            4. NinjaTrader will then confirm if the import has been successful.

            Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

            Once installed, you may add the indicator to a chart by:
            • Right-click your chart > Indicators... > Select the Indicator from the 'Available' list on the left > Add > OK

            Here is a short video demonstration of the import process:
            The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.


            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Thank you for the options. Would it be possible to use in "algo fashion", like I code it once and forget it for good?

              Comment


                #8
                Hello UltraNIX,

                Thanks for your reply.

                "Would it be possible to use in "algo fashion", like I code it once and forget it for good?" I am assuming the context here is your strategy looks at the instrument it is applied to and checks the rollover date and then exits on or x days after the rollover date?

                I don't have any examples but would point you to look at the rollover indicator linked in the prior post for an idea of the coding required to pull the rollover date, in particular, the section in "private void CalculateRollDate()".

                Here are links to the methods and properties involved:





                If you would like something coded for you, we can provide a link to 3rd party providers in the NinjaTrader Ecosystem.



                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  On the original question of putting the system to sleep whilst keeping NT8 running, I have been advised previously by NT Support that doing that is not supported and may cause issues.

                  It would be good to have a definitive answer on this matter, and even better if sleep mode were fully supported if it is not already.

                  Thanks.
                  Multi-Dimensional Managed Trading
                  jeronymite
                  NinjaTrader Ecosystem Vendor - Mizpah Software

                  Comment


                    #10
                    Originally posted by jeronymite View Post
                    On the original question of putting the system to sleep whilst keeping NT8 running, I have been advised previously by NT Support that doing that is not supported and may cause issues.

                    It would be good to have a definitive answer on this matter, and even better if sleep mode were fully supported if it is not already.

                    Thanks.
                    I use 'common sense' in my actual case - if I put the computer to sleep 10 minutes AFTER SESSION CLOSE on Friday and turn it back on on Sunday BEFORE SESSION STARTS, it means that no trading activity is present within sleeping period. My strategy is set to ImmediatelySubmit, so even if any errors occur, it should get back to normal.

                    However, according to the same common sense and what has been clarified by NinjaTrader_PaulH - if you put computer to sleep DURING trading hours, it may cause issues.

                    Comment


                      #11
                      Yes ... logically correct ... but the issues I was advised of were not related to the effect on trades as a result of "absence" at a certain time; rather, it was to advise on the "integrity" of the running of NT8 itself. The advice was that running NT8 after waking from sleep is not supported as NT8 itself may not function correctly. It was not specifically related to any orders that might be active.

                      That's the support question that needs to be definitively addressed, regardless of any active orders.

                      Thanks.
                      Multi-Dimensional Managed Trading
                      jeronymite
                      NinjaTrader Ecosystem Vendor - Mizpah Software

                      Comment


                        #12
                        Here are some references in the forum to this lack of support:

                        https://ninjatrader.com/support/foru...eep-mode-on-pc
                        https://ninjatrader.com/support/foru...or#post1163637
                        https://ninjatrader.com/support/foru...-after-exiting
                        https://ninjatrader.com/support/foru...om-hibernation
                        https://ninjatrader.com/support/foru...-up-from-sleep
                        https://ninjatrader.com/support/foru...dicator-import
                        https://ninjatrader.com/support/foru...aphics-problem
                        I just downloaded the last NJ 8 version which use IBgateway ver 978. Everything is fine except the fact that the new IBgateway version restart every day causing NJ to disconnect and not automatically reconnect once IBgateway restart. Is there a workaround?


                        Thanks.
                        Last edited by jeronymite; 10-30-2021, 01:21 AM.
                        Multi-Dimensional Managed Trading
                        jeronymite
                        NinjaTrader Ecosystem Vendor - Mizpah Software

                        Comment


                          #13
                          Originally posted by jeronymite View Post
                          Yes ... logically correct ... but the issues I was advised of were not related to the effect on trades as a result of "absence" at a certain time; rather, it was to advise on the "integrity" of the running of NT8 itself. The advice was that running NT8 after waking from sleep is not supported as NT8 itself may not function correctly. It was not specifically related to any orders that might be active.

                          That's the support question that needs to be definitively addressed, regardless of any active orders.

                          Thanks.
                          Then, hopefully, TechSupport would clarify it here once and for all. Thank you for addressing the issue.

                          Comment


                            #14
                            Hello UltraNix and jeronymite,

                            Thanks for your discussion on this.

                            From my initial reply: "Please note that in general, we do not recommend sleep modes and always recommend disabling them because if the computer goes to sleep when there is active trading, it might not be able to handle your position."

                            We are not recommending using sleep mode and the decision to do this would be UltraNIX's.

                            Paul H.NinjaTrader Customer Service

                            Comment


                              #15
                              I can report on what happened between yesterday and today:
                              1. I woke the computer up - NinjaTrader was disconnected and not reconnecting on it's own (I waited for like 2 minutes).
                              2. I tried to disconnect and then connect back - no success.
                              3. I restarted my PC, loaded Ninjatrader, connected, enabled strategy (as it was disabled on exit) - everything works as expected.
                              I plan to repeat this routine each Sunday.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Austiner87, Today, 05:02 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post Austiner87  
                              Started by tonynt, 05-21-2019, 06:27 AM
                              10 responses
                              530 views
                              1 like
                              Last Post fiendtrades  
                              Started by awwenzovs, Today, 08:03 AM
                              2 responses
                              14 views
                              0 likes
                              Last Post NinjaTrader_Eduardo  
                              Started by Ashkam, 04-29-2024, 09:28 AM
                              4 responses
                              44 views
                              0 likes
                              Last Post Ashkam
                              by Ashkam
                               
                              Started by nightstalker, Yesterday, 02:05 PM
                              1 response
                              31 views
                              1 like
                              Last Post NinjaTrader_Eduardo  
                              Working...
                              X