because i was trying to do it with just EnterLong/shortLimit but sometimes it gives me this error. But it was just a enterlonglimit so how is that possible?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Enter limit market
Collapse
X
-
Enter limit market
Hi, i want to put an limit order that when touched by the price generates a market order . FOr example: price is 1400 i put a limit buy at 1390. when the prices reaches 1390 it generates a market porder, is it possible?
because i was trying to do it with just EnterLong/shortLimit but sometimes it gives me this error. But it was just a enterlonglimit so how is that possible?Last edited by AlessioCianini12; 02-01-2022, 01:36 PM.Tags: None
-
Hello AlessioCianini12,
Thank you for your post.
You could simply submit a market order when the current price reaches your specified entry point rather than using a limit or stop limit order.
This looks like a problem with a stop or target being submitted to the wrong side of the market when an entry is made, however. You can try to mitigate this by moving your stops further from the entry price to try to avoid situations in which the price moves quickly as the entry fills, but there's always the possibility that this could still occur. You can also consider changing your RealTimeErrorHandling to RealtimeErrorHandling.StopCancelCloseIgnoreRejects and monitoring for a rejection in OnOrderUpdate(). You can then program in your own handling for when a stop is rejected, possibly resubmitting the stop at a different level or just submitting a market order to close the position in question.
Please let us know if we may be of further assistance to you.
-
ok but when something happen i put a limit entry buy order 3 tiks under the current price. how can i do in order to use a market order?
Comment
-
Hello AlessioCianini12,
Thank you for your reply.
You would simply want to save the Close[0] price at the time your condition would normally place the limit order to a variable, then check if the current Close price is less than or equal to that variable's value. If it is, the limit order would have been hit, so you can then submit a market order.
Please let us know if we may be of further assistance to you.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
88 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
135 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
119 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
69 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment