Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Sell only filled quantity
Collapse
X
-
Sell only filled quantity
8 out of 10 times ninjatrader is selling random amounts. Is there a script that says "sell only filled quantity"? instead of selling whatever it feels like selling?Tags: None
-
Hello faisamtrader,
I would not expect NinjaTrader to submit an order with a random quantity. The quantity you type into the Quantity field should be the quantity submitted with the order.
Fills will be determined by the market activity. (Meaning sometimes an order will part fill until fully filled)
Are you placing manual orders and the filled quantity is not matching the submission quantity in the Quantity field of the trade window?
Are you wanting a NinjaScript addon that detects manually placed orders and will submit an order based on the fill quantity of a manually placed order?Chelsea B.NinjaTrader Customer Service
-
Hey Chelsea,
Thanks for your response.
I am using an automated script approach.
If the code says to buy 5000 shares, and I only get filled for 4500. It will hit pt and sell 4500 shares, the remaining 500 shares will remain and becomes short when the price gets to my stoploss.
Then it will buy another 5000 share it my conditions meet, if I get filled for 2500 shares, this time it will hold the shorts(as there is no PT for the short positions) and I will be left with a crazy and weird number of shares.
Just need 2 things....first to disable the option to go short.....and second the PT and SL to be only for whatever is FILLED rather than whatever amount the buy order was for.
I want it to sell the quantity that was bought only!!!
Comment
-
Hi faisamtrader, thanks for your reply.
Does this happen when fewer contracts are used? Like 100? Please provide a reduced example that causes the issue and I can test it out on my PC. I've never seen a strategy attempt to place one amount of orders and fill only a portion of them. There's two ways of setting up a stop loss and profit target, either set the order yourself in OnExecutionUpdate like this example shows or use the SetStopLoss/ProfitTarget methods. The set methods require no intervention, as long as the signal name for your orders match the "fromSignalName" parameter the stop loss/profit target will be applied for each order that has been filled.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
19 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
119 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
63 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
41 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
45 views
0 likes
|
Last Post
|

Comment