Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Change SL/TP size in chart and transfer to strategy logic
Collapse
X
-
Change SL/TP size in chart and transfer to strategy logic
Tags: None
-
Hello sidlercom80,
This would not be able to be done by using a Strategy, that will only see updates it makes to the orders. Any manual changes would not be observed by the script. You could use an indicator with the addon account to do this type of interaction. Watching the account directly would let you observe all order events like manual changes. https://ninjatrader.com/support/help...ount_class.htm
I look forward to being of further assistance.
-
Hi _Jesse, I use my own PositionUpdate which is handled by the OnOrderUpdate() method, so I can't access the internal strategy position, or did I get something wrong?Originally posted by NinjaTrader_Jesse View PostHello sidlercom80,
This would not be able to be done by using a Strategy, that will only see updates it makes to the orders. Any manual changes would not be observed by the script. You could use an indicator with the addon account to do this type of interaction. Watching the account directly would let you observe all order events like manual changes. https://ninjatrader.com/support/help...ount_class.htm
I look forward to being of further assistance.
From another post discussed with _Jim: you do not have to worry about the strategy position stating it is out of sync because the strategy is not following the internal strategy position. It would be following the Position object we created within the strategy, that is updated with OrderUpdate events.
https://ninjatrader.com/support/foru...kers-api/page2
Comment
-
Hello sidlercom80,
The comments Jim provided are for a different subject, that relates to how the override is called in relation to how the broker provides that information.
OnOrderUpdate is not called for manual orders or manual changes, you would need to avoid using a strategy to execute this type of goal. Strategy overrides are based on the changes which the strategy makes and not what you are doing outside of the strategy.
If you want to make a tool that works with manual changes you could use an indicator for that purpose and the addon account to work with the manual orders/events/changes. Strategies are generally intended to work for you and without your interaction based on its virtual information.
Please let me know if I may be of additional assistance.
Comment
-
Hi _Jesse, I only need the changes for already submitted orders and not for a new order. My solution is:
Code:protected override void OnOrderUpdate(...) //OrderState Working if (orderState == OrderState.Working) { targetPrice = limitPrice; quantityTP = quantity; }
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
20 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