Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
replace stoploss
Collapse
X
-
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.
-
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
Comment
-
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
-
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 PostOk 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=3751Last edited by tonynt; 01-07-2013, 08:41 AM.
Comment
-
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
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
105 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
53 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
35 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
38 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
74 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment