Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Behavior - Amended Stop

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

    Order Behavior - Amended Stop

    Hello,

    I have complex trading system. And lately I got on live account unxpected line:
    21. 5. 2015 15:34:51 Amended stop order: Order='1fed7eeaae0c47f0a150a06f06d39ce7/94132!AMP!ac94132' Name='Stop loss' State=PendingSubmit Instrument='TF 06-15' Action=BuyToCover Limit price=0 Stop price=1256,6 Quantity=1 Strategy='TF: Jen na 5 minut' Type=Stop Tif=Day Oco='22440714896-136' Filled=0 Fill price=0 Token='8eb282e8ce824eb18b87e1cf039d2d18' Gtd='1. 12. 2099 0:00:00'

    Do you have idea, when this line shows up? I log every command like SetStopLoss, SetProfitTarget, Exit and do not where this comes from.

    Thanks for advices

    Pavel Kujal
    Attached Files

    #2
    Hello Pavel,

    Thank you for your post.

    Would you mind sending over your full log and trace files to platformsupport[at]ninjatrader[dot]com?

    You can do this by going to the Control Center-> Help-> Mail to Platform Support.

    Please reference this thread in the subject line: "http://www.ninjatrader.com/support/forum/showthread.php?t=74397"

    Comment


      #3
      I sent it right now. thanks for help

      Comment


        #4
        Hello kujista,

        Thank you for sending in these files.



        I see a Sell Short that fills at 1253.4, but then it's Stop Loss is submitted to 1251 which is invalid. So it is rejected.

        This can be seen when a Stop Loss is not reset between entries and thus uses the previous value as the new one has not been submitted. Generally resetting the value to a tick based value (CalculationMode.Ticks) works best. You can find an example of this at the following link: http://www.ninjatrader.com/support/f...ead.php?t=3222


        Please let me know if you have any questions.

        Comment


          #5
          Where this behavior comes from? I used stop loss:
          21. 5. 2015 15:34:51 Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='Open 24 mrav [1270] P#2' Mode=Price Value=1256,6 Currency=0 Simulated=False

          I cannot set stoploss using ticks, it's computed from TF5 candles values I do not know at the time of entry, home many ticks it is. Is there a way to "reset stoploss" to work good in CalctulationMode.Price?

          Or can you at least guarantee, if I change all stop loss methods to TICKS, that it solves the problem? This seems very wierd to me. Still don't get the reason why

          Comment


            #6
            Originally posted by kujista View Post
            Where this behavior comes from? I used stop loss:
            21. 5. 2015 15:34:51 Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='Open 24 mrav [1270] P#2' Mode=Price Value=1256,6 Currency=0 Simulated=False

            I cannot set stoploss using ticks, it's computed from TF5 candles values I do not know at the time of entry, home many ticks it is. Is there a way to "reset stoploss" to work good in CalctulationMode.Price?

            Or can you at least guarantee, if I change all stop loss methods to TICKS, that it solves the problem? This seems very wierd to me. Still don't get the reason why
            You have to reset your StopLoss before your next trade, precisely to stop this kind of problem. As you say, you cannot know how far away this would be, so it is best to reset it using CalculationMode.Ticks, so that you guarantee dynamically that the Stop is far enough away. You can always change the Stop to a price mode after the trade is entered and in progress.

            Comment


              #7
              By reseting stop loss you mean use: SetStopLoss("entry",CalculationMode.Ticks, calculatedTicks); ?

              Because I am pretty sure that when I use comupted stoplloss at price which is 24 ticks above, it never causes this problem. Problem has to be (as far I know) when using CalculationMode.Price, even if filling price is below (when going short) computed stoploss price, which confuses me. I place SL @1256,6 when entry filled price (short) is 1252,8. I see no problem in this. I am wondering if using ticks ALWAYS solves this bug.

              Comment


                #8
                Originally posted by kujista View Post
                By reseting stop loss you mean use: SetStopLoss("entry",CalculationMode.Ticks, calculatedTicks); ?

                Because I am pretty sure that when I use comupted stoplloss at price which is 24 ticks above, it never causes this problem. Problem has to be (as far I know) when using CalculationMode.Price, even if filling price is below (when going short) computed stoploss price, which confuses me. I place SL @1256,6 when entry filled price (short) is 1252,8. I see no problem in this. I am wondering if using ticks ALWAYS solves this bug.
                That has nothing really to do with it. As I said, you reset when the trade is over, before you enter the next trade, so that at entry, you will have a correctly positioned Stop. You can adjust the Stop anyway you want after the trade is entered.

                You only need to reset when you first go flat at any time. If you do not, the Stop will be positioned at the last price it was at, which may be an invalid Stop for your next entry. You do the reset so that you have a valid stop. All your arguments about how you want to set the Stop during the trade are not relevant to the issue of where the Stop should be before you enter the trade..

                Comment


                  #9
                  I am starting getting in
                  so before
                  SellShort("EntryName",1)
                  I should call SetStopLoss(20);
                  something like that. and after sellshort I set my computed SL (even in CalculationMode.Price)

                  Comment


                    #10
                    Originally posted by kujista View Post
                    I am starting getting in
                    so before
                    SellShort("EntryName",1)
                    I should call SetStopLoss(20);
                    something like that. and after sellshort I set my computed SL (even in CalculationMode.Price)
                    Exactly, except that so that the Stop is not too far away, but still valid, you want to use CalculationMode.Ticks for the reset. Then once you are in the trade, you can change the Stop to your desired price, calculated however you wish, and using CalculationMode.Price to place the amended Stop if that is your preference.

                    Just so that you know, I prefer to use CalculatedMode.Price myself when I use the Set() methods. I prefer to specify a price, not an offset that the computer will have to calculate.
                    Last edited by koganam; 05-25-2015, 02:48 PM.

                    Comment


                      #11
                      I couldn't understand calling SetStopLoss ... when being flat - before entering position. Well I hope this easy solution helps and I don't have change all my Stop Loss counting methods

                      Comment


                        #12
                        Originally posted by kujista View Post
                        I couldn't understand calling SetStopLoss ... when being flat - before entering position. Well I hope this easy solution helps and I don't have change all my Stop Loss counting methods
                        You need to wrap your mind around concepts. SetStopLoss() does not place an order: it places a marker that tells the order engine where to place a Stop if a trade should get entered. So, if already in a trade, then the order does get placed immediately, as the order placement conditions are already satisfied in that case.

                        Comment


                          #13
                          So the behavior as I considered to be strange happened when previous trade had set SL price bellow current trader fill price (and when I didnt reset it before entry it made me a mess)... If I get now. I really thank you for saving next sleepless nights

                          Comment


                            #14
                            I guess the same rules applies to placing Profit Target? So I should better reset it before entering trade.

                            Comment


                              #15
                              Originally posted by kujista View Post
                              I guess the same rules applies to placing Profit Target? So I should better reset it before entering trade.
                              You had better! Or you might find yourself exiting the trade a soon as you enter it.
                              Last edited by koganam; 05-29-2015, 10:16 AM. Reason: Corrected spelling.

                              Comment

                              Latest Posts

                              Collapse

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