Can I use SetStopLoss and SetProfitTarget in OnExectionUpdate? Can you toss a hint at other potential causes I should look for?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
SetStopLoss and SetProfitTargets in OnExecutionUpdate
Collapse
X
-
SetStopLoss and SetProfitTargets in OnExecutionUpdate
I am entering a a Position in OnBarUpdate then waiting for the Entry confirmation in OnExecutionUpdate to enter the stop loss and profit target based on the entry orders fill price. I am using SetStopLoss to set the stop and SetProfitTarget for the profit. Then in OnbarUpdate I am checking the price to determine if I move the Stop to Breakeven. The very first trade works fine (print everything to Output Window). The second trade has some lingering orders when I print from OnOrderUpdate. These orders are still in OnOrderUpdate State.Working after OnPositionUpdate is showing MarketPosition.Flat. The chart text and lines are showing all the correct trades, the rogue working orders ever get filled.
Can I use SetStopLoss and SetProfitTarget in OnExectionUpdate? Can you toss a hint at other potential causes I should look for?Tags: None
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
43 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
30 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
48 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
38 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment