Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
TailStop for multiple entrees?
Collapse
X
-
Hello relogical,
Thank you for your post.
This is possible by tracking the position size and comparing it to the previous size. Then adjust your Stop Loss price and size based on your desired parameters.
You can use Position.Quantity to track the quantity: http://www.ninjatrader.com/support/h...7/quantity.htm
Please let me know if you have any questions.
-
There are some different ways this could be done and while I don't have an exact example I will get you pointed in the right direction.
For advanced order management use this example to get started. It will show you how to setup an auto breakeven stop order through the use of IOrders. When using IOrders you're able to track your orders individually and are given more flexibility when placing your targets and stops:
The OnOrderUpdate() and OnExecution() methods are reserved for experienced programmers. Instead of using Set() methods to submit stop-loss and profit target orders, you can submit and update them manually through the use of IOrder and IExecution objects in the OnOrderUpdate() and OnExecution() methods. The OnOrderUpdate()
To track the avg fill price you can use this for the whole position: http://www.ninjatrader.com/support/h...l?avgprice.htm
Or this for an individual IOrder: IOrder.AvgFillPrice http://www.ninjatrader.com/support/h...tml?iorder.htm
Let me know if I can further assist.LanceNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DavidHP, Today, 07:56 AM
|
1 response
5 views
0 likes
|
Last Post Today, 08:16 AM | ||
Started by kujista, Today, 06:23 AM
|
3 responses
6 views
0 likes
|
Last Post
by kujista
Today, 08:15 AM
|
||
Started by Mindset, Yesterday, 02:04 AM
|
2 responses
17 views
0 likes
|
Last Post Today, 08:15 AM | ||
Started by f.saeidi, Today, 08:03 AM
|
1 response
5 views
0 likes
|
Last Post Today, 08:15 AM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
15 responses
52 views
0 likes
|
Last Post Today, 08:13 AM |
Comment