Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stop-management

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

    stop-management

    Hello,

    I send an email for funding instructions in Euro not to support. But I still have a technical questions please:

    I do scale in and scale out with my script-strategies. I assume that all works fine as I see always correct number of stops in orders tab.

    But when I see same number of stops in orders tab does this mean that really all stop-orders are correct matching with positions?

    EG entry 1a, 1b, 1c
    SetStopLoss("1a", CalculationMode.Ticks, 8, false);
    SetStopLoss("1b", CalculationMode.Ticks, 8, false);
    SetStopLoss("1c", CalculationMode.Ticks, 8, false);

    then scaling out one with ExitLong(1), script takes off eg "1a"

    then new entry with
    EntriesPerDirection = 1;
    EntryHandling = EntryHandling.UniqueEntries;

    so there´s only one entry now for "1a"

    and so on.

    Will the stops be always correct and matching with the positions (so that I can be sure if connection interrupted it will be OK on the exchange? Info: I do not use OCO, no targets there)

    Thank you
    Tony

    #2
    Hello Tony,

    Thank you for your post.

    The orders will be associated to the correct position as long as you use the correct fromEntrySignalName in the Exit() and Set() methods.

    Please let me know if I may be of further assistance.

    Comment


      #3
      Hello Patrick,

      thank you for your reply.

      As I wrote, I have in the script ExitLong(1).

      So, I do not refer to a SetStoploss. I think NT is that "intelligent" to do itself? As it is possible to work with ExitLong(1) or ExitLong(2).... in NinjaTrader it should work and refer to the corresponding SetStopLoss.

      How do you mean I should additionally use correct fromEntrySignalname to use ExitLong(1)?

      Thank you
      Tony



      Originally posted by NinjaTrader_PatrickH View Post
      Hello Tony,

      Thank you for your post.

      The orders will be associated to the correct position as long as you use the correct fromEntrySignalName in the Exit() and Set() methods.

      Please let me know if I may be of further assistance.

      Comment


        #4
        Hello Tony,

        Thank you for your response.

        For example:
        Code:
        ExitLong(1, "Exit1a", "1a");
        Where the syntax is ExitLong(int quantity, string signalName, string fromEntrySignal). For more information please visit the following link: http://www.ninjatrader.com/support/h...d_approach.htm

        Comment


          #5
          Hello Patrick,

          thank you for your reply. I know very well about this. But

          a.) why is it possible to work with exitLong(1) then if you say it is necessary to code as below in your example?

          b.) when coding like your example how could I scale out this way?

          c.) with exitlong(1) and lets say there is the exit of "1b" doesnt NT then automatically cancel the stoporder for this? because for entry "1a", "1b", "1c" there is the corresponding stop SetStopLoss("1a"...), SetStopLoss("1b"...) SetStopLoss("1c"...)

          So if NT chooses the next positionor whatever it exits of the 3 entries then it will cancel the stop simultaneously also, no?

          Best
          Tony

          Originally posted by NinjaTrader_PatrickH View Post
          Hello Tony,

          Thank you for your response.

          For example:
          Code:
          ExitLong(1, "Exit1a", "1a");
          Where the syntax is ExitLong(int quantity, string signalName, string fromEntrySignal). For more information please visit the following link: http://www.ninjatrader.com/support/h...d_approach.htm
          Last edited by tonynt; 03-31-2015, 10:50 AM.

          Comment


            #6
            Hello Tony,

            Thank you for your response.

            I see, that would be accurate. However, as the Exit() is not tied to a specific entry signal name it would not properly cancel or make the Set() method invalid.

            Comment


              #7
              Hello,

              thank you for your reply. Sorry, I do not understand you short answer to my accurate questions a-c.

              Thank you
              Tony

              Originally posted by NinjaTrader_PatrickH View Post
              Hello Tony,

              Thank you for your response.

              I see, that would be accurate. However, as the Exit() is not tied to a specific entry signal name it would not properly cancel or make the Set() method invalid.

              Comment


                #8
                Hello Tony,

                Thank you for your response.
                Originally posted by tonynt View Post
                a.) why is it possible to work with exitLong(1) then if you say it is necessary to code as below in your example?

                b.) when coding like your example how could I scale out this way?

                c.) with exitlong(1) and lets say there is the exit of "1b" doesnt NT then automatically cancel the stoporder for this? because for entry "1a", "1b", "1c" there is the corresponding stop SetStopLoss("1a"...), SetStopLoss("1b"...) SetStopLoss("1c"...)

                So if NT chooses the next positionor whatever it exits of the 3 entries then it will cancel the stop simultaneously also, no?
                a) In real-time trading the ExitLong(1) is not going to be associated to any specific position (1a, 1b, 1c, etc.) and will just close out one quantity for the position. Therefore it needs to be associated to a specific entry if you want to close a specific size of the total position (again 1a, 1b, 1c, etc. - all being part of one position).

                b) You would call the Exit() method for each entry signalName.

                c) Right, but it is not going to close any specific one of these.

                Comment


                  #9
                  Hello,

                  thank you for your reply again.

                  I know that the exitlong(1) is not associated to any specific position. This was never the question. And I dont want to close a specific size of the total position. This also I have not written or asked for. I know that it is not closing any specific size of the total position.

                  The question - that is still not answered - is if any NOT SPECIFIC SIZE OF TOTAL POSITION is closed IF THEN THE CORRESPONDING STOP IS CANCELLED. In other words to explain: can it happen that position1 or 2 or 3 is closed of total size of 3 BUT the corresponding stop is not cancelled and instead of the associated stop another stop is cancelled. So that there persits a trade with stop not corresponding to this positions so that this will not work once stopprice is triggered

                  eg entry 1a, 1b, 1c with setstoploss (1a,...) setstoploss (1b,...) setstoploss (1c,...)
                  then there is exitlong 1b and stoploss(1a,...) is cancelled so that we have then
                  position 1a, 1c with setstoploss(1b,...) and setstoploss(1c,...) Can this occur?

                  This is the question and I dont know how to explain more accurately in english.

                  Thank you
                  Tony



                  Originally posted by NinjaTrader_PatrickH View Post
                  Hello Tony,

                  Thank you for your response.

                  a) In real-time trading the ExitLong(1) is not going to be associated to any specific position (1a, 1b, 1c, etc.) and will just close out one quantity for the position. Therefore it needs to be associated to a specific entry if you want to close a specific size of the total position (again 1a, 1b, 1c, etc. - all being part of one position).

                  b) You would call the Exit() method for each entry signalName.

                  c) Right, but it is not going to close any specific one of these.
                  Last edited by tonynt; 04-01-2015, 12:57 PM. Reason: more concrete information

                  Comment


                    #10
                    Tony,

                    It will cancel the Stop Loss closest to the average entry price. If they are all at the same price, it will close the one submitted first - the one that is added by the first SetStopLoss() in the code from top down.

                    Comment


                      #11
                      Hello,

                      thank you for your reply and your support!

                      So, referring to my example and your reply it will not be a problem if we have the 3 entries with the 3 stops and from them we have 1 exit but with stop that is not associated to this position (eg close of entry 1b but stop 1a is cancelled)

                      A.) so that there persist position 1a, 1c with stops 1b, 1c AND referring to your reply then with the close of next position eg 1a there will be cancelled stop 1b or 1c which is the next one closest to average entry price AND it is not important and not a problem that the stop is 1b or 1c (and not 1a which is the position actually closed this moment).

                      B.) And the more important question: if price goes against me and position 1a and 1c should be closed with the persisting stops (which are 1b and 1c in our example) will that work?

                      C.) if B.) will not work - I assume it will not work, how can one scale out with using exitlong(signalname, from entrysignal)? One has to check always which one of the position is still there so that it can be closed (?)

                      Thank you in advance for clearifying this finally.
                      Tony

                      Originally posted by NinjaTrader_PatrickH View Post
                      Tony,

                      It will cancel the Stop Loss closest to the average entry price. If they are all at the same price, it will close the one submitted first - the one that is added by the first SetStopLoss() in the code from top down.
                      Last edited by tonynt; 04-01-2015, 02:54 PM. Reason: clearifying question

                      Comment


                        #12
                        Hello Tony,

                        1 and 2 are correct. So the Stop Losses will still close out the appropriate amount no matter which position is closed. The fromEntrySignalNAme allows you to control which Stop Loss you would cancel if the Exit() fills.

                        Comment


                          #13
                          Hello,

                          thank you for your reply. To avoid any confusion let me ask the most important thing without other technical informations:

                          there is from initial entries 1a, 1b, 1c only the long-position "1c" remaining in the trade. And there is one stop "1b" (because NT "used" the 2 other stops for the 2 other entries, for whatever reason that is not important,...)

                          When price of long-position "1c" is falling and touches/triggers/crosses stop-price"1b" will then the long-position "1c" be closed with this stop "1b" and stop cancelled? (I do not see what happens on the exchange with my stops accurately and if the orders and executions shown in corresponding tabs are 100% matching with the exchange)

                          Thank you
                          Tony


                          Originally posted by NinjaTrader_PatrickH View Post
                          Hello Tony,

                          1 and 2 are correct. So the Stop Losses will still close out the appropriate amount no matter which position is closed. The fromEntrySignalNAme allows you to control which Stop Loss you would cancel if the Exit() fills.

                          Comment


                            #14
                            Hello Tony,
                            When price of long-position "1c" is falling and touches/triggers/crosses stop-price"1b" will then the long-position "1c" be closed with this stop "1b" and stop cancelled?
                            Yes the position will be appropriately closed even though the Stop Loss was for another entry.

                            Comment


                              #15
                              Thank you!

                              But there is another thought now: isn´t every stop associated to the specific entry with same name with an ID or somehow else? So that each stop is recognized at the exchange with the same ID as the corresponding position. Or is this only the same Id within a trade (and not every position of the trade)

                              Thank you in advance for you reply!
                              Tony

                              Originally posted by NinjaTrader_PatrickH View Post
                              Hello Tony,

                              Yes the position will be appropriately closed even though the Stop Loss was for another entry.
                              Last edited by tonynt; 04-02-2015, 02:48 PM. Reason: clearifying

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by bortz, 11-06-2023, 08:04 AM
                              47 responses
                              1,610 views
                              0 likes
                              Last Post aligator  
                              Started by jaybedreamin, Today, 05:56 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post jaybedreamin  
                              Started by DJ888, 04-16-2024, 06:09 PM
                              6 responses
                              19 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by Jon17, Today, 04:33 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post Jon17
                              by Jon17
                               
                              Started by Javierw.ok, Today, 04:12 PM
                              0 responses
                              16 views
                              0 likes
                              Last Post Javierw.ok  
                              Working...
                              X