Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reversing a position after stoploss triggered

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

    Reversing a position after stoploss triggered

    Hello Ninja,
    I've been busting my head trying to figure out this one. In the strategy
    builder is there a way to reverse position at the instance of a stoploss being
    hit?
    Example: Say I'm short, the market goes against me, my stoploss is hit, and I
    want to reverse immediately and then exit that postion on a reverse that would
    be progamed into my original strategy.
    Can it be done in the strategy wizard?
    Rick

    #2
    Hi RickStevenson1,

    Thank you for your post.

    Can you please take a look at the following thread. Let me know if that doesn't help.

    TimNinjaTrader Customer Service

    Comment


      #3
      Thank you for the response. I looked it over and it doesn't seem to be quite what I want. Maybe it is the right info, but I did see the exact connection.
      I simply want to reverse my position when my stop loss is triggered.
      Rick

      Comment


        #4
        Rick,

        Instead of using stop loss, just place your reversal order at the desired stop price. If you were long, instead of using a stop loss, use a EnterShortStop() order and place that at your stop price. When the stop price is reached, it will close your long and open you a short position.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          Rick,

          Instead of using stop loss, just place your reversal order at the desired stop price. If you were long, instead of using a stop loss, use a EnterShortStop() order and place that at your stop price. When the stop price is reached, it will close your long and open you a short position.
          Josh,
          Thank you for your response. I've been going over this suggestion. I've read over the info on order methods and I'm still a little confused as to how I would insert this idea into my strategy. It sounds as if you're suggesting that I do this as the trade is progressing. If that is your suggestion, is there a way to program this into my strategy? If I misuderstood, I still can't figure out how to use the Wizard to put this in my strategy. Will I need to manually program this? If so, would you mind giving me a few more pointers?
          Thanks,
          Rick

          Comment


            #6
            Rick,

            In the strategy wizard, you just create out whatever you deem is your condition to reverse your position. That could be using Close price versus a Numeric Value with the Numeric value being equal to your stop price. At that point in time then just submit your reversal order with "Enter short" or "Enter long".
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Ok, I'm sure that would work. The problem is that because my strategy is going to call the entry, I have no idea until the trade begins what my stop price will be. By the time I rewrote the code the market may have blown through the area of my desried stop/reverse. Is there a way to program something like "from position entry price x + or - x ticks enterlongstop"?

              Also is there a way to reference one strategy by another. If the entry rules are getting in the way of what I want to do I thought perhaps I could reference the stop price of one strategy to another for an Enter.
              Rick
              Last edited by RickStevenson1; 02-20-2010, 07:16 PM.

              Comment


                #8
                Rick, for your second question you will definitely have to jump into the programming aspect of NinjaTrader. That is simply not possible with the wizard.

                As for the first qusestion, the offset property is used to specify a certain price away from the desired value. Please see the attached picture of the offset to see where it is.
                Attached Files
                AustinNinjaTrader Customer Service

                Comment


                  #9
                  Thank you for the reply. I have changed the offset on my conditions. I'm using a simple crossover strategy and using 2 strategies. I changed the offset of the 2nd strategy to enter 5 ticks from the entry of the 1st strategy. I overlayed the 2 strategies and there was no difference in the entries. I used the offset type ticks and chose 5 for the value. No change. I then changed the type to price and 50 for value. No change. I then offset one of the indicators and left the other alone. No change.
                  Isn't there a simple way to reverse a position??? I simply want to reverse a position once my stoploss is hit and flattened.
                  Rick

                  Comment


                    #10
                    Rick, unfortunately I'm not sure what you coded up and how - however strategies do not cross commnuicate, which means you can't tell Strategy 2 to place an Exit order at the entry of Strategy 1 minus x ticks...what you could do is place a reversal order at a predefined offset in one strategy.

                    Comment


                      #11
                      Ok forget the 2 strategies. I thought that would foul someone up. I put up 2 strategies with the same entry conditions to see if the idea given to me by Austin of using offsets would make a difference. Even with the offsets my entries were the same.
                      All that I want to do is have my strategy reverse my position after my stoploss is triggered. If I've been long and my stoploss is triggered I want the strategy to immediately call a short. If I'm short and my stoploss is triggered I want the strategy to immediately call a long.
                      I am shocked at how difficult this seems to be and how I can't get a straight answer on this. I have looked at every post dealing with reversing a position. It seems to me that there is no way to have a strategy order a reverse on its own. Perhaps I have misuderstood the advice I've been given in thread. And perhaps I have misunderstood all the other post, but I don't think so.
                      Can I just get a straight answer? Is there a way to reverse after a stoploss has been triggered? Or if I'm to use an Enter() to reverse, how do I program that price point in without knowing in advance where that exact point will be?
                      Rick

                      Comment


                        #12
                        Rick,

                        Just use Position.AvgPrice + 5 * TickSize or whatever you want the offset to be and plug that into your order as your stop price.

                        In the Strategy Wizard you can grab the equivalent of Position.AvgPrice in the Strategy category. Then use the Offset parameter and punch in 5 or whatever amount you want.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Thanxs for the help. I think I'm on the right track now, but I am having some further issues. I plugged in the Position.AvgPrice + 5 * TickSize to the stop price, but the order doesn't trigger at all. In the TraceOrder I got this error message: "This was an exit order but no position exists to exit"
                          I called the EnterLongStop with the same condition as the EnterShort hoping that the reverse would happen, but nothing did. I have attatched the Trace Orders and Condition builder. Could you please show me what I did wrong?
                          Many Thanks,
                          Rick
                          Attached Files

                          Comment


                            #14
                            You cannot call them at the same time. What you need to do is wait for the EnterLong() and EnterShort() to actually establish positions. Then you can place in your EnterShortStop()/LongStop() orders to protect them afterwards.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              If I understand you correctly your saying that I need to monitor my strategy and after I enter a position I manually open the Wizard or the Ninja Editor and enter the Stop information for the trade and then do that with each succeeding trade throughout the day. Is that correct?

                              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
                              573 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X