Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to disable auto close/reverse?

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

    How to disable auto close/reverse?

    Hi,

    My strategy would either go long or go short based on certain conditions:

    EnterLong
    EnterShort

    I found one thing... if I have a position open (profit/stop loss not met), and if the reverse condition is true, it will automatically close my current position and go reverse.

    For example, if I long 100 shares at 100 (stop 95, profit 105), and if the short condition is met while the price is at 98, the strategy will close the 100-shares long immediately and enter short.

    Is there a way to stop further EnterShort in above case when there is a position open? I don't want any other conditions to close a trade (except the stop & profit target) when there is a position open for this strategy. Please help.


    Thanks.

    #2
    ShadowKnows, you could include a check in your entry condition to see if you're currently flat, so it would not issue the reverse then in your example, since there's a position open - http://www.ninjatrader.com/support/h...htsub=position

    Comment


      #3
      Thanks, it's exactly what I needed

      Comment


        #4
        Originally posted by ShadowKnows View Post
        Hi,

        My strategy would either go long or go short based on certain conditions:

        EnterLong
        EnterShort

        I found one thing... if I have a position open (profit/stop loss not met), and if the reverse condition is true, it will automatically close my current position and go reverse.

        For example, if I long 100 shares at 100 (stop 95, profit 105), and if the short condition is met while the price is at 98, the strategy will close the 100-shares long immediately and enter short.

        Is there a way to stop further EnterShort in above case when there is a position open? I don't want any other conditions to close a trade (except the stop & profit target) when there is a position open for this strategy. Please help.


        Thanks.
        How are you setting your StopLoss and ProfitTarget? Using the Set() methods or the Exit() methods?

        Comment


          #5
          Originally posted by koganam View Post
          How are you setting your StopLoss and ProfitTarget? Using the Set() methods or the Exit() methods?
          Set method

          Comment


            #6
            Originally posted by NinjaTrader_Bertrand View Post
            ShadowKnows, you could include a check in your entry condition to see if you're currently flat, so it would not issue the reverse then in your example, since there's a position open - http://www.ninjatrader.com/support/h...htsub=position
            Does it only check current strategy or the whole account?

            Comment


              #7
              Originally posted by ShadowKnows View Post
              Does it only check current strategy or the whole account?
              This would be checking the current strategy instance's position only.

              Comment


                #8
                Originally posted by NinjaTrader_Bertrand View Post
                This would be checking the current strategy instance's position only.
                Exactly what I needed, thanks!

                Comment


                  #9
                  The answers here dont tell anything. I am trying to stop ninja trader from doing any exiting on my behalf as I am trying to manage this myself but it just kicks in and does terrible things to my stratergy.

                  Can anyone please indicate how to stop ninja from doing any exiting / trade management as I have my own stop loss coded and wish ultimate control with ninja not guessing what I am trying to do!!! ARRGH NinjaTrader stop doing stuff for me I dont want !!!

                  Comment


                    #10
                    Welcome to our forums - which exits exactly are you referring to which your script would process? Which name do they show in the stats? If you reverse in the managed mode NT would always take care of the reversal qty needed for the Enter methods and for example an ExitOnClose at session end would also be done by default (could be set to false from the strategy parameters in the UI).

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    648 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    369 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    108 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    572 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    574 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X