Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RC2 - Auto Close Position enabling Killed strategy and open order

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

    RC2 - Auto Close Position enabling Killed strategy and open order

    I had an automated strategy running at 4:01:42PM and wanted to make sure the strategy exited at 4:40PM. I went to options and enabled the feature (4:40PM was already filled in since it is generally what I use for risk management).

    Upon accepting the feature, I found that NT8 had disabled my active strategy and its active order. Looks like it flattened everything and that killed the strategy. The other strange thing is that is said it was TRIGGERED at 8:01:42PM (For hours ahead), but the log time stamp clearly shows the 16:01:42 time stamp. Seems like something isn't quite right. I have submitted the logs and trace files under #1588415.

    2016-10-14 15:00:36:554|1|64|Instrument='ZB 12-16' Account='Account2' Average price=163.21875 Quantity=1 Market position=Short Operation=Operation_Add
    2016-10-14 16:01:42:572|1|4|Auto close enabled=True: All
    2016-10-14 16:01:42:949|1|64|Auto close on account 'Acccount1' triggered at '10/14/2016 8:01:42 PM' on all instruments
    2016-10-14 16:01:42:949|1|64|Flatten account='Acccount1'
    2016-10-14 16:01:42:949|1|64|Auto close on account 'Account2' triggered at '10/14/2016 8:01:42 PM' on all instruments
    2016-10-14 16:01:42:949|1|64|Flatten account='Account2'
    EDIT: Just an update, it did autoclose the strategy at 4:40PM as well... Strange... but the time reported was 8:40:00PM.
    2016-10-14 16:08:40:711|1|4|Enabling NinjaScript strategy 'ShortOnly-DL01NONLomGenericInterfaceShortOnly/87066978' : 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
    2016-10-14 16:40:00:431|1|64|Auto close on account 'Sim101' triggered at '10/14/2016 8:40:00 PM' on all instruments
    2016-10-14 16:40:00:431|1|64|Flatten account='Sim101'
    2016-10-14 16:40:00:520|1|64|Auto close on account 'Acccount1' triggered at '10/14/2016 8:40:00 PM' on all instruments
    2016-10-14 16:40:00:534|1|64|Flatten account='Acccount1'
    2016-10-14 16:40:00:534|1|64|Auto close on account 'Account2' triggered at '10/14/2016 8:40:00 PM' on all instruments
    2016-10-14 16:40:00:534|1|64|Flatten account='Account2'
    2016-10-14 16:40:00:535|1|4|Disabling NinjaScript strategy 'ShortOnly-DL01NONLomGenericInterfaceShortOnly/87066978'
    Last edited by NJA_MC; 10-14-2016, 02:43 PM.

    #2
    Hello NJA_MC,

    Thank you for your post.

    Can you attach a screenshot of the Options > Trading > Auto Close Position option?

    Comment


      #3
      Originally posted by NinjaTrader_PatrickH View Post
      Hello NJA_MC,

      Thank you for your post.

      Can you attach a screenshot of the Options > Trading > Auto Close Position option?
      Sure,

      Here you go, also please see my note EDIT on the first post you may have read it as I was creating the new post. At 4:40PM it also closed with an 8:40PM time stamp in the log.
      Attached Files

      Comment


        #4
        Hello NJA_MC,

        When setting the Auto Close Position did you restart NinjaTrader 8 afterwards? Had the Auto Close Position ever been set to 8:40 pm?

        I will continue to test this on my end. Thank you for your report and details.

        Comment


          #5
          Originally posted by NinjaTrader_PatrickH View Post
          Hello NJA_MC,

          When setting the Auto Close Position did you restart NinjaTrader 8 afterwards? Had the Auto Close Position ever been set to 8:40 pm?

          I will continue to test this on my end. Thank you for your report and details.
          I did not restart, and it has never been set to 8:40PM I think that is GMT so there may be an odd bug around that. Very strange it closed again at 8:40PM.

          Comment


            #6
            Thank you for your response, NJA_MC.

            May I ask what Time Zone your PC is set to?

            Comment


              #7
              EST, This has occurred on 2 different systems.

              Comment


                #8
                Hello NJA_MC,

                Thank you for your response.

                So the user case is that no matter what time you enable the 'Auto close position' option for the strategies and positions on the instruments set up in the 'Auto close position' option are immediately disabled/closed?

                Comment


                  #9
                  Originally posted by NinjaTrader_PatrickH View Post
                  Hello NJA_MC,

                  Thank you for your response.

                  So the user case is that no matter what time you enable the 'Auto close position' option for the strategies and positions on the instruments set up in the 'Auto close position' option are immediately disabled/closed?
                  Hi Patrick,

                  That is what happened at 4:01PM EST, I suspect that for some reason it is using GMT as it showed 8:01PM in the log file. So I suspect, but haven't had a chance to test it, that if I enabled it before 12:00 NOON (4:00PM GMT) it would have not disabled the strategies, not sure if it would shut down at 12:40PM EST and 4:40PM EST.

                  Comment


                    #10
                    Thank you, NJA_MC.

                    I will continue to test on my end.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by frankthearm, Yesterday, 09:08 AM
                    14 responses
                    47 views
                    0 likes
                    Last Post NinjaTrader_Clayton  
                    Started by gentlebenthebear, Today, 01:30 AM
                    2 responses
                    13 views
                    0 likes
                    Last Post gentlebenthebear  
                    Started by Kaledus, Today, 01:29 PM
                    2 responses
                    8 views
                    0 likes
                    Last Post Kaledus
                    by Kaledus
                     
                    Started by PaulMohn, Today, 12:36 PM
                    2 responses
                    16 views
                    0 likes
                    Last Post PaulMohn  
                    Started by Conceptzx, 10-11-2022, 06:38 AM
                    2 responses
                    56 views
                    0 likes
                    Last Post PhillT
                    by PhillT
                     
                    Working...
                    X