IOrder buy = null, sell = null, stoplong = null, stopshort = null, targetlong = null, targetshort = null;
protected override void OnBarUpdate()
{
buy = SubmitOrder(0, OrderAction.Buy, OrderType.Limit, 100, sPrice, 0, "", "Buy");
...
protected override void OnExecution(IExecution execution)
{
if (buy != null && buy == execution.Order) {
stoplong = SubmitOrder(0, OrderAction.Sell, OrderType.Limit, 100, 0, sPrice - _lossLimit, "", "Sell Stop");
targetlong = SubmitOrder(0, OrderAction.Sell, OrderType.Limit, 100, sPrice + _profitTarget, 0, "", "Sell Target");
}
...
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Unmanaged Stop gives price of zero
Collapse
X
-
Unmanaged Stop gives price of zero
Using the following code whenever my "stoplong" order triggers it reports a fill at zero instead of at the stop price. Am I misusing the SubmitOrder for Unmanaged?
Code:Tags: None
-
Hi dbooksta, thanks for your post.
That's great, I'm glad you were able to find the issue! Feel free to reply with any further questions you may have.<span class="name">Alex C.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
57 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
143 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
161 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
97 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
276 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment