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

Exit on Session close orders - Renko

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

    Exit on Session close orders - Renko

    Hi
    in my strategy I have set IsExitOnSessionCloseStrategy = false;
    I am using Renko charts, at the end of the day session I see market orders with exit on session close title (see figure attached)
    How can I avoid these orders to be generated please?
    I don't want basically any market orders to take me out of my positions at the end of the day.
    Thanks for your help
    Attached Files

    #2
    Hello jakjak74,

    Thanks for your post.

    Can you clarify the conditions of the screenshot, is this a live data example (strategy run on live data and it exited the trade at the end of session) or are you showing a historical trade after the strategy is applied to live data or is this strictly historical data?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for replying. Previously I had live data but I have just tried with only historical data and I got these unwanted exit orders. What I see is that if I have open positions, the strategy closes my positions slightly before midnight each day.

      In the strategy I have unmanaged orders only and the only orders I set are limit orders using SubmitOrderUnmanaged. However I can see in the backtest result a bunch of market orders to close open positions close to 10-11pm locally.
      I have put a set of examples of these orders which all have the name Exit on session close. How is the session close defined around 10pm each day?

      I don't have similar behaviour in NT7.
      I would like to remove this behaviour and have only my limit orders.
      THanks
      Attached Files

      Comment


        #4
        I am actually wondering if IsExitOnSessionCloseStrategy in NT8 is equivalent to ExitOnClose in NT7. I guess not as I have open orders closed when reaching the end of day. Is there some other keywords to forbid this behaviour in NT8?

        Comment


          #5
          Hello jakjak74,

          Thanks for your replies.

          I am investigating what you have provided and will update this thread later today.

          Thanks for your patience.
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Hi Paul
            please ignore this. I found an error on my side.
            Apologies for this thread.

            Thanks again

            Comment


              #7
              Hello jakjak74,

              Yes, IsExitOnSessionCloseStrategy in NT8 is the same as ExitOnClose in NT7, reference: http://ninjatrader.com/support/helpG...ng_changes.htm

              With reference to the helpguide on IsExitOnSessionCloseStrategy, have you placed the code in the OnStateChange() method in either State.SetDefaults or State.Configure? http://ninjatrader.com/support/helpG...sestrategy.htm

              When you apply the strategy with IsExitOnSessionCloseStrategy = false, in the strategy Properties, is the check box for "Exit on session close" checked or unchecked?

              As you mentioned using Renko bars, please note the helpguide warning: "If you are using a non time-based Bar Type, such as Renko, and have "Break at EOD" set to False on the Data Series, this means that IsExitOnSessionCloseStrategy could trigger after the session close, since the last bar of the session can extend beyond the session close time in this scenario."

              What version of NT8 are you using? (Help>About)
              Paul H.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by jakjak74 View Post
                Hi Paul
                please ignore this. I found an error on my side.
                Apologies for this thread.

                Thanks again
                Hello,

                Thanks for your reply, it came in while I was replying.

                Glad you found the issue.
                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by andrewtrades, Today, 04:57 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by chbruno, Today, 04:10 PM
                0 responses
                6 views
                0 likes
                Last Post chbruno
                by chbruno
                 
                Started by josh18955, 03-25-2023, 11:16 AM
                6 responses
                436 views
                0 likes
                Last Post Delerium  
                Started by FAQtrader, Today, 03:35 PM
                0 responses
                7 views
                0 likes
                Last Post FAQtrader  
                Started by rocketman7, Today, 09:41 AM
                5 responses
                19 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X