Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

replace stoploss

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

    #16
    Glad to hear Tony, I would suggest checking into the TraceOrders output to better understand why your stops are cancelled for the remaining position. If you're not familiar with it already, you can add TraceOrders = true to your Initialize() method and then on next run the script will populate the output window with detailed info on your 'under the hood' order processing events.

    Comment


      #17
      Hello Bertrand,

      thank you for your reply. In the output window appears then

      07.01.2013 08:54:40 Entered internal PlaceOrder() method at 07.01.2013 08:54:40: BarsInProgress=0 Action=Sell OrderType=Market Quantity=1.000 LimitPrice=0 StopPrice=0 SignalName='x1' FromEntrySignal='MyEntry1'
      07.01.2013 08:54:40 Cancelled pending exit order, since associated position is closed: Order='3a872dc4852740de92015737659d7e07/Sim101' Name='MyStop1' State=Accepted Instrument='6E 03-13' Action=Sell Limit price=0 Stop price=1,2977 Quantity=3.000 Strategy='testexitlong' Type=Stop Tif=Gtc Oco='' Filled=0 Fill price=0 Token='3a872dc4852740de92015737659d7e07' Gtd='01.12.2099 00:00:00'


      But why are all 3000 of the stop cancelled? Isn´t it possible to exitlong(1000) of total 3000 and having from my exitlongstop still 2000 in the trade? I thought with exitlong(x) I can take off the quantity x? No?

      Thanks
      Tony
      Last edited by tonynt; 01-07-2013, 08:03 AM. Reason: clearify

      Comment


        #18
        Ok thanks Tony, yes this is possible, but then you can't tie it all to the same entry name. You would need to scale in with your entries to be able to scale out later. In your example the position for NT is closed since you have only one named MyEntry1 one running and ExitLong this signal.

        Comment


          #19
          Hello Bertrand,

          thank you for your reply and thanks for the sample. I know this and I did the last months entries with seperate names but when there are more trades then there are so many lines on brokers platform. Isnt there another possibiltiy to enter with a higher number and to take off part of it a.) with exitlong or b.) exitlongstop or c.) is there another way or idea to to?

          What about the idea to enter with 3000, then exit 1000 and bringing in same moment a new stop with Position.Quantity?


          Thanks
          Tony

          Originally posted by NinjaTrader_Bertrand View Post
          Ok thanks Tony, yes this is possible, but then you can't tie it all to the same entry name. You would need to scale in with your entries to be able to scale out later. In your example the position for NT is closed since you have only one named MyEntry1 one running and ExitLong this signal.

          http://www.ninjatrader.com/support/f...ead.php?t=3751
          Last edited by tonynt; 01-07-2013, 08:41 AM.

          Comment


            #20
            Tony, you could look into the NT7 Unmanaged order submission mode as alternative, here the direct qty as specified is used, as NT's managed mode signal tracking would not be in effect.

            Comment


              #21
              Thanks,

              before thinking about the unmanaged approach (no worry, this I will not ask anymore as I´m not a programmer;-) I want to ask:

              referring to you information that (all) stops are cancelled when exitlong(part. qty) is executed this sounds somehow like OCO. Can´t this be disabled so that the stop persists even when a partial target is hit? (I do update my stops in every case referring to the position quantity).


              Thanks
              Tony

              Comment


                #22
                Tony, you could unfortunately not dictate that behavior via a setting, you would either need to resort to unmanaged mode or scale in to scale out later via the managed approach.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                108 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                55 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                37 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                39 views
                0 likes
                Last Post TheRealMorford  
                Started by Mindset, 02-28-2026, 06:16 AM
                0 responses
                76 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Working...
                X