Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Shut down the computer the week end

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

    Shut down the computer the week end

    Hi

    i finish my script and i ran it last monday...

    but this is now the week end... and how can i shut down my computer friday and turn it on monday easily without losing my stop and target order ?

    Thx
    Thomas

    #2
    Thomas, if you plan on turning off your computer over the weekends, it is suggested your strategy cleans up its positions and orders at the end of trading Friday. When Sunday comes around, you can start your computer back up and turn your strategy on and have it recalculate the stop/target orders and resubmit.

    Alternatively, you could just leave your computer on over the weekend.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Austin,

      Got any code examples of this?

      Also, what improved features were included in NT version 7, that accomodate automated trading?

      Comment


        #4
        You would just check for the DayOfWeek and Time then Borland to issue ExitLong / Short orders to get flat if needed.

        An overview over NT7's main enhancements can be seen here - http://www.ninjatrader.com/support/h..._version_7.htm

        Most notably the performance is strongly increased and for automated trading we would now have strategy instances / settings persisting across session breaks which greatly simplifies multi strategy management.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Actually, I was considering equity swing automated trading, and staying with the current position (long, flat) with a end of day shutdown for over the evening or weekend.

          What doesn't NT7 not handle for this case that would require additional code? Isn't the strategy persistant, so when NT7 is launched the next morning, the strategy continues to run where it left off?

          Comment


            #6
            borland, it entirely depend if you would like to stay in the market over the weekend or not - but most connections do require daily / weekly restarts. The strategy is persistent and can stay running or be re-enabled if you need to reset things.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Sorry, thought I was clear.

              - I want to shutdown the computer at the end of trading (Monday -Friday), and reboot the computer just before market opens.

              - Before every shutdown, if my position is long, I want to stay long overnight and wait for any sell trigger the next day. Otherwise, I'd be flat waiting for the next buy trigger.

              So, when you say persistant, do you mean unless I shutdown the computer? Or is NT7 persistant with any NT script strategy previously loaded and running with each NT7 launch?

              What would need to be reset in this case? Thanks!

              Comment


                #8
                What is meant by persistence, is the running strategy is basically saved in the NT environment so when you reconnect the strategy could simply be restarted and provided your position would still be in sync (account vs strategy wise) you would be good to go (NT7 does not have an autoSync option as well, so a market order is then used if needed to establish the sync to the executed to account). This could be needed as if you re-enable the strategy is being recalculated by NT which could lead to a different historical strategy position which would then be different then the one held in the account...but I would not expect this to be common occurrence.

                All encountered sync scenarios are listed here in the helpguide - http://www.ninjatrader.com/support/h..._positions.htm

                For the reset I was referring to the brokers servers which happens at different times for the providers we support (it's an individual matter) but if you shutdown after trading and reopening before the next day market open it should be fine.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Hi

                  i read the guide "syncing account positions"... but there is something i don't understand...

                  Here my situation:

                  1- Every monday, before the opening i will launch my strategy assuming my account position is flat (because i flatten all strategy on friday) but my strategie position is not invetably flat.
                  So the best combination if i well understand is Wait until flat before executing live, Sync account position = false

                  2- Every evening, my broker (interactive broker) shut down the connection with NT (because it shut down automatically the workstation every night), but my account position and my strategy position are long or short and i have working order from the strategy (stop and profit order) in the broker station... the next morning, when i launch interactive workstation and NT... i want than everything continue as the previous day... the position stay short or long and i want to see the same working stop and profit order on NT and to interactive broker workstation...
                  So the best combination if i well understand is Immediately submit live working historical orders, Sync account position = false

                  So, i have two different situation,
                  First, the monday morning
                  Second, from Tuesday morning to Friday evening...

                  So i have to change between my 2 situations the "Wait until flat before executing live" and "Immediately submit live working historical orders" settings found in the Strategies tab of the Options dialogue AND the "Sync account position" option found in the NinjaScript strategy dialogue window when you are adding a strategy

                  It is not so easy... and there is a big risk of error manipulation or forget manipulation and it is complicated in the future if i have some strategies i want to keep during the week end...

                  Can you help me to find an easiest way for my 2 situations ?

                  Thx
                  Thomas

                  Comment


                    #10
                    Thomas, thanks for post and feedback - we appreciate it.

                    I would look into flattening the historical strategy position on Friday when you leave for the week as well, this way you could run with 'immediately submit' all week.

                    There are also handy 3rd party programs around that can change the TWS logoff time, so you could stay connected througout the week, a search with Google would list a few of those.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      So you mean for every friday, instead of flatten my strategy position by myself, i write the script to flat the position by it self ? if friday = exit long exit short

                      About the handy 3rd party programs that can change the TWS logoff time... i'm ok but imagine i lose the connection with TWS Interactive broker (internet connection or other problem)... the account position will be long or short with working order (stop and target), the best to restart everything without flatten the account position is 'immediately submit' and 'Sync account position = false' ?

                      just to be sure before starting the live trading...

                      Comment


                        #12
                        Yes on both your points - we talked about it also in your other thread, just flatten your strategy as well - this way you are already flat coming on for Monday's session.
                        BertrandNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by funk10101, Today, 12:02 AM
                        0 responses
                        1 view
                        0 likes
                        Last Post funk10101  
                        Started by gravdigaz6, Yesterday, 11:40 PM
                        1 response
                        7 views
                        0 likes
                        Last Post NinjaTrader_Manfred  
                        Started by MarianApalaghiei, Yesterday, 10:49 PM
                        3 responses
                        10 views
                        0 likes
                        Last Post NinjaTrader_Manfred  
                        Started by XXtrader, Yesterday, 11:30 PM
                        0 responses
                        4 views
                        0 likes
                        Last Post XXtrader  
                        Started by love2code2trade, 04-17-2024, 01:45 PM
                        4 responses
                        28 views
                        0 likes
                        Last Post love2code2trade  
                        Working...
                        X