Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to set OnOrderUpdate to allow manual adjustment to ProfitTarget Order
Collapse
X
-
How to set OnOrderUpdate to allow manual adjustment to ProfitTarget Order
I am having the same issue needing to Manually adjust the stop loss and profit target orders once in a trade. I read something about OnOrderUpdate() which seems to imply that an updated order (which manually moving would be OrderUpdate but I need some help figuring our how to include in strategy.Tags: None
-
Hello DTSSTS,
You would need to use Exit methods and you would not be able to use Set methods. (Set methods continuously update and will undue any manual changes to the order)
Then be sure that the order is only submitted once and the script does not update the price of the order at a later time.
A good place to do this would be from OnExecutionUpdate() or OnOrderUpdate() when the entry order's OrderState is OrderState.Filled.
An example of placing orders in OnOrderUpdate can be found here. However, you would not want to include the logic that causes the trailing / chasing behavior in OnBarUpdate().
Chelsea B.NinjaTrader Customer Service
-
THOUGHT this could possibly be the answer

not sure how to impliment
I will read the links you posted, Thanks
Comment
-
what do i do with these ? import into ninja

Comment
-
Hello DTSSTS,
The examples you can import and view the code and use this as working example when designing your own scripts.
To import a NinjaScript into NinjaTrader 8 do the following:- Download the script to your desktop, keep it in the compressed .zip file.
- From the Control Center window select Tools -> Import -> NinjaScript...
- Click the Desktop icon on the left to navigate to the desktop
- Select the downloaded .zip file -> then click Open
- NinjaTrader will then confirm if the import has been successful.
You can place orders using Atm Strategy methods with AtmStrategyCreate() using an Atm Strategy template (setup on the SuperDOM or ChartTrader) and then once the stop is working change the price of the stop with AtmStrategyChangeStopTarget().
As a heads up, orders placed with Atm Strategy methods are basically the same as manually placed orders and do not affect the strategy position and do not trigger order methods such as OnOrderUpdate(), OnExecutionUpdate(), or OnPositionUpdate().
Included with NinjaTrader is the SampleAtmStrategy script that demonstrates how to place orders using Atm Strategy methods.
Below are links to the help guide on Atm Strategy Methods, AtmStrategyCreate(), GetAtmStrategyStopTargetOrderStatus(), and AtmStrategyChangeStopTarget().
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment