Picture Below:
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Profit Target Not Using Full Quantity
Collapse
X
-
Profit Target Not Using Full Quantity
Problem: I use SetProfitTarget(CalculationMode.Currency, $100) for my orders, today my trading system entered 5 contracts for futures, when the profit target was hit it only sold 2 of those 5. Now I am left with 3 contracts and my trading system thinks it's not in a position. Why did it not sell all 5 at the profit target? Why 2?
Picture Below:
Tags: None
-
Uploaded log below, no errors. It was a Sim101 AccountOriginally posted by NinjaTrader_ChrisL View PostHi JakeOfSpades, thanks for your post.
Please look to the Log tab of the Control Center. Do you have any errors regarding the strategy or these orders? Was this on a live account or the Sim101 account?
I look forward to hearing from you.
1 PhotoLast edited by JakeOfSpades; 03-27-2020, 11:03 AM.
Comment
-
Hi JakeOfSpades, thanks for your reply.
Could you make a reduced strategy I can test that re-creates the problem? I just want to see if I can reproduce this problem. You may Export it and send it to platformsupport at ninjatrader.com and reference "Attn ChrisL 2475990"
SetStopLoss should apply to all orders without a signal name. If your orders do have signal names, you would need to use the SetStopLoss override that takes a fromEntrySignal string
SetStopLoss(string fromEntrySignal, CalculationMode mode, double value, bool isSimulatedStop)
I look forward to hearing from you.
Comment
-
Sent that Request Chris, thank you. Would setting signal names possibly help? I don't have any yet.Originally posted by NinjaTrader_ChrisL View PostHi JakeOfSpades, thanks for your reply.
Could you make a reduced strategy I can test that re-creates the problem? I just want to see if I can reproduce this problem. You may Export it and send it to platformsupport at ninjatrader.com and reference "Attn ChrisL 2475990"
SetStopLoss should apply to all orders without a signal name. If your orders do have signal names, you would need to use the SetStopLoss override that takes a fromEntrySignal string
SetStopLoss(string fromEntrySignal, CalculationMode mode, double value, bool isSimulatedStop)
I look forward to hearing from you.
Comment
-
Hi Jake, thanks for sending that in.
In the script you have a signal name set for the profit target but not for the EnterLong() method. Please add signal names to the orders and make sure they match when you call SetProfitTarget. You should get proper quantity management after this.
Kind regards.
Comment
-
Still happening, look at the Profit Target, why is it a quantity of 21 when the entry was 57. The Stop Loss was correct but not the Profit Target. I can share my code if you have Skype or Zoom, it would resolve this a lot quicker.Originally posted by NinjaTrader_ChrisL View PostHi Jake, thanks for sending that in.
In the script you have a signal name set for the profit target but not for the EnterLong() method. Please add signal names to the orders and make sure they match when you call SetProfitTarget. You should get proper quantity management after this.
Kind regards.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
79 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
45 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
66 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment