Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can I define the "Time to flatten" for the "Exit on Close" in the NinjaScript?

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

    Can I define the "Time to flatten" for the "Exit on Close" in the NinjaScript?

    I was told that in "Tools-->Options-->Misc-tab", I can enter 'Time to flatten'.
    The 'Exit On Close' function will use the time entered here as session close.


    My question is that
    What if I have an instrument with market close at 2:00pm and another instrument with market close at 4:00pm? Can I define the "Time to flatten" in the NinjaScript strategy?

    Anyone can help?
    Last edited by dleekk; 09-10-2009, 09:45 AM.

    #2
    dleekk,

    Please see this post: http://www.ninjatrader-support2.com/...06&postcount=5

    ExitOnCloseSeconds is what you want.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks

      I am aware of the "ExitOnClose" and "ExitOnCloseSeconds". However, the "ExitOnClose" function will use the time entered in the "Time to flatten" field as the closing time.

      Imagine I am trading on multiple instruments. 1 instrument has closing on 14:00 and another instrument has closing on 16:00. Then I will have trouble defining "Time to flatten" and "ExitOnCloseSeconds" if my goal is to close-out all positions 60sec before market close for all the instruments that I trade.

      Comment


        #4
        Unfortunately this would not be supported.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I find this thread, which I think can solve my problem.

          Support for the development of custom automated trading strategies using NinjaScript.

          Comment


            #6
            Have a look at this:

            It's an "all or nothing", so if you have staged timeframes between your instruments, then you are out of luck using this method. You may however find it helpful.




            You are own your own, NT will not support you for this. Try at your own risk.

            I think it's the same as the "Flatten Everything" command found on the menu.




            Originally posted by dleekk View Post
            Thanks

            I am aware of the "ExitOnClose" and "ExitOnCloseSeconds". However, the "ExitOnClose" function will use the time entered in the "Time to flatten" field as the closing time.

            Imagine I am trading on multiple instruments. 1 instrument has closing on 14:00 and another instrument has closing on 16:00. Then I will have trouble defining "Time to flatten" and "ExitOnCloseSeconds" if my goal is to close-out all positions 60sec before market close for all the instruments that I trade.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            558 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X