Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I enter at close of bar one and exit at close of session?

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

    How can I enter at close of bar one and exit at close of session?

    I need to enter at close of bar one, beginning of session, which I am able to do, and exit at close of session without any other possible trades being allowed. At the moment I am getting multiple trades which I don't want. I have not found how to do this.

    Steve

    #2
    Hello Steve,

    You can enable 'Exit on close' in the window that appears when you backtest an instrument. Please see the link below for more information.


    Exit on close - When enabled, open positions are closed on the last bar of a session
    JasonNinjaTrader Customer Service

    Comment


      #3
      Jason,

      Thanks for the reply. I do have exit at close set to true. The trouble is that my trade gets taken out when there is a trade entry triggered in the opposite direction before the close of session. My initial entry will be long or short so I have to enter both conditions. But I want the initial entry to stay in till the close without a succession of trades ie without another entry being able to be triggered.

      Steve

      Comment


        #4
        You will need to debug your strategy, so it will functions as you like. Please see the link below for general debug information.
        JasonNinjaTrader Customer Service

        Comment


          #5
          Hi Jason

          Perhaps I should be addressing the broader community with my question. I followed your reference Jason about debugging which assumes knowledge about coding which I do not have. There is nothing to strip away as I only have one condition which is to enter after the first bar after identifying if the trade will be long or short.

          I guess I am saying if I knew what to do, I wouldn't be asking. I assume what I want can not be done using the wizard.

          If anyone can help me with code so that my entry on first bar of session can not be wiped out by further triggers till end of session when my single trade will exit that would be a big help.

          Steve

          Comment


            #6
            Hello Steve,

            You could also contact any of the supported NinjaScript consultants at the link below for assistance with NinjaScript.
            JasonNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by sidlercom80, 10-28-2023, 08:49 AM
            170 responses
            2,271 views
            0 likes
            Last Post sidlercom80  
            Started by Irukandji, Yesterday, 02:53 AM
            2 responses
            17 views
            0 likes
            Last Post Irukandji  
            Started by adeelshahzad, Today, 03:54 AM
            0 responses
            3 views
            0 likes
            Last Post adeelshahzad  
            Started by CortexZenUSA, Today, 12:53 AM
            0 responses
            3 views
            0 likes
            Last Post CortexZenUSA  
            Started by CortexZenUSA, Today, 12:46 AM
            0 responses
            1 view
            0 likes
            Last Post CortexZenUSA  
            Working...
            X