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

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 rocketman7, Today, 09:41 AM
            5 responses
            16 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by frslvr, 04-11-2024, 07:26 AM
            9 responses
            124 views
            1 like
            Last Post caryc123  
            Started by selu72, Today, 02:01 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Zachary  
            Started by WHICKED, Today, 02:02 PM
            2 responses
            18 views
            0 likes
            Last Post WHICKED
            by WHICKED
             
            Started by f.saeidi, Today, 12:14 PM
            8 responses
            21 views
            0 likes
            Last Post f.saeidi  
            Working...
            X