Can I use SetStopLoss and SetProfitTarget in OnExectionUpdate? Can you toss a hint at other potential causes I should look for?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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
-
Chris L.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kujista, Today, 06:23 AM
|
0 responses
1 view
0 likes
|
Last Post
by kujista
Today, 06:23 AM
|
||
Started by traderqz, Yesterday, 04:32 PM
|
1 response
10 views
0 likes
|
Last Post Today, 06:14 AM | ||
Started by f.saeidi, Today, 05:56 AM
|
1 response
4 views
0 likes
|
Last Post
by Jltarrau
Today, 06:00 AM
|
||
Started by Jltarrau, Today, 05:57 AM
|
0 responses
4 views
0 likes
|
Last Post
by Jltarrau
Today, 05:57 AM
|
||
Started by Stanfillirenfro, Yesterday, 09:19 AM
|
7 responses
52 views
0 likes
|
Last Post Today, 05:31 AM |
Comment