Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automatic "ExitOnClose" terminates a Strategy?

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

    Automatic "ExitOnClose" terminates a Strategy?

    Hi Ninjas, a simple matter here.

    My intention is that my code is able to Exit any position on Close, using one of the three methods:
    1. Options: Flatten All
    2. Grid : ExitOnClose enabled
    3. Code: ExitOnClose enabled.

    now, at the same time. I'd like that the Strategy continues to be enabled for the next session. The problem is that the automatic "ExitOnClose" instruction, disables the Strategy, so I have to restart it manually. I wouldn't like to code any Time module in the OnBarUpdate method.

    Any suggestion?

    #2
    Hello pstrusi,

    Thanks for your post.

    Unless you are willing to compromise on , " I wouldn't like to code any Time module in the OnBarUpdate method." I don't know of any other way to accomplish your goal other than to use a time and position check in some time period before the end of the session.

    Perhaps others in the community might have some other ideas. Keep in mind that for the 3 ways listed that the strategy would need to maintain its own time and position check for that to work.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      So, in conclusion :

      - Any of those methods available from NT will terminate always the Strategy?

      Thanks for your answer

      Comment


        #4
        Hello pstrusi,

        Thanks for your reply.

        I was mistaken in my understanding.

        ExitOnClose will not disable your strategy. ExitOnClose = true, "Indicates if the strategy will cancel all strategy generated orders and close all open strategy positions at the close of the session."
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by pstrusi View Post
          So, in conclusion :

          - Any of those methods available from NT will terminate always the Strategy?

          Thanks for your answer
          No. Only the Flatten All method will terminate not only the strategy, but will exit all positions that you have in everything. Be careful with it!

          Using ExitOnClose from anywhere will close only the strategy position at the close of session, and leave the strategy enabled.
          Last edited by koganam; 12-07-2015, 04:30 PM.

          Comment


            #6
            Thank you very much Koganam, your deep knowledge about NT always sheds light in this forum.

            Best regards
            Last edited by pstrusi; 12-08-2015, 09:14 AM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Rogers101, 05-05-2024, 11:30 AM
            15 responses
            43 views
            0 likes
            Last Post Rogers101  
            Started by ninza33, Today, 12:31 PM
            2 responses
            9 views
            0 likes
            Last Post ninza33
            by ninza33
             
            Started by Bobin, 03-12-2024, 08:51 AM
            15 responses
            480 views
            0 likes
            Last Post fiddich
            by fiddich
             
            Started by Skifree, Today, 11:21 AM
            4 responses
            13 views
            0 likes
            Last Post Skifree
            by Skifree
             
            Started by Bogdan097, Today, 03:25 PM
            0 responses
            4 views
            0 likes
            Last Post Bogdan097  
            Working...
            X