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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
43 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
29 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
46 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
38 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment