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 closed entered a buy order

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

    Exit On Session closed entered a buy order

    I was running a strategy that had exit on session closed = true
    I put exit on session 3000 seconds before 5 pm which should close everything right around 4pm
    Instead it opened a buy order at 4:09:30

    A Few hours before this happened the strategy entered 2 buy longs at market that I couldnt close from the ninjatrader 8 so I closed it thru rithimic instead but the unrealized pnl stayed open on ninjatrader. Any idea what could have happen and how to avoid this

    #2
    Hello rickyblah12,

    Thank you for your reply.

    What interval chart are you running the strategy on? (1 minute, 4 renko, etc)

    Is this a single series strategy, or does it use multiple data series?

    Is the strategy run On Each Tick, On Bar Close, or On Price Change?

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      1. Its a special chart called Ninzarenko
      2. Strategy is Multiple data series
      3.Strategy is on bar close

      Comment


        #4
        Hello rickyblah12,

        Thank you for your reply.

        The issue is that you're setting Exit on Session close early, but you're not telling your strategy not to enter after that time, when the market is still open. All Exit at Session close does is place an order to close your current position when you tell it to - it doesn't keep your strategy from entering after that point if there's still data coming in and bars forming. You'd need to set up a time comparison to make sure no entries are taken after that point.

        Here's a link to our help guide that goes over using a time filter to limit trading hours:



        Please let us know if we may be of further assistance to you.

        Kate W.NinjaTrader Customer Service

        Comment


          #5
          thats the thing I do have a time limit on it that stops trading before the exit on session close

          Comment


            #6
            Hello rickyblah12,

            Thank you for your reply.

            Please post a sample of your code showing your time restriction setup -- I'd like to take a look. If you feel comfortable posting the whole strategy, you may do so.

            Thanks in advance; I look forward to assisting you further.
            Kate W.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by elirion, Today, 01:36 AM
            0 responses
            3 views
            0 likes
            Last Post elirion
            by elirion
             
            Started by gentlebenthebear, Today, 01:30 AM
            0 responses
            4 views
            0 likes
            Last Post gentlebenthebear  
            Started by samish18, Yesterday, 08:31 AM
            2 responses
            9 views
            0 likes
            Last Post elirion
            by elirion
             
            Started by Mestor, 03-10-2023, 01:50 AM
            16 responses
            391 views
            0 likes
            Last Post z.franck  
            Started by rtwave, 04-12-2024, 09:30 AM
            4 responses
            34 views
            0 likes
            Last Post rtwave
            by rtwave
             
            Working...
            X