Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Update order
Collapse
X
-
Hello malcolm,
Thanks for your post.
No, you do not need a name. If a limit order has not yet been filled and you submit a limit order at a different price, the price will be adjusted.
Here is a quick example to demonstrate:
if ((State == State.Realtime)
&& (Doitonce == true)) // Doitonce is a bool that is initially set to true
{
EnterLongLimit(Convert.ToInt32(DefaultQuantity), (Low[0] + (-10 * TickSize)) , ""); // this is the initial order 10 ticks below the low of the just closed bar, done once
Doitonce = false;
}
// Set 2
if (Doitonce == false)
{
EnterLongLimit(Convert.ToInt32(DefaultQuantity), (Low[0] + (-20 * TickSize)) , ""); // This adjusts the same order to 20 ticks below the low and will be different price on each new bar
}
Note: If you did use a signal name you would need to use the same signal name to update the same order. Same example but with a signal name:
if ((State == State.Realtime)
&& (Doitonce == true)) // Doitonce is a bool that is initially set to true
{
EnterLongLimit(Convert.ToInt32(DefaultQuantity), (Low[0] + (-10 * TickSize)) , "Test"); // this is the initial order 10 ticks below the low of the just closed bar, done once
Doitonce = false;
}
// Set 2
if (Doitonce == false)
{
EnterLongLimit(Convert.ToInt32(DefaultQuantity), (Low[0] + (-20 * TickSize)) , "Test"); // This adjusts the same order to 20 ticks below the low and will be different price on each new bar
}
- Likes 1
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
87 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
132 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
65 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
118 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
67 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment