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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
163 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
82 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
125 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
206 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
184 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment