Conditions are the same for short and long. I tested this a few times, changing the limit order on the buy side to just "enter long position". That works fine and the trades trigger. It's when I change to "enter long position by a limit order" that it doesn't trigger any trades. Tested it on several charts - same thing. Thanks.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Builder Limit Orders
Collapse
X
-
Strategy Builder Limit Orders
I have a strategy created with the builder. I was testing entries using limit orders (the drop down limit under Order Management). The short side works fine. But the long side never fills.
Conditions are the same for short and long. I tested this a few times, changing the limit order on the buy side to just "enter long position". That works fine and the trades trigger. It's when I change to "enter long position by a limit order" that it doesn't trigger any trades. Tested it on several charts - same thing. Thanks.Tags: None
-
Hello, thanks for writing in. If the strategy has an active short entry limit order then the long limit order would be ignored. Using the builder you must let the first limit order placed get filled then close the position and submit the next order in the opposite direction or let one bar close and do not re-submit the limit order, this will automatically cancel the order on the next bar. In an unlocked script, one can use the CancelOrder() method to cancel orders at will.
https://ninjatrader.com/support/help...thod_to_ca.htmChris L.NinjaTrader Customer Service
-
Thanks. I'm not sure I understand. The strategy doesn't take a lot of trades. The last short trade would have been triggered and exited before a long would be executed. The strategy can't be short and long at the same time. So there's nothing to cancel. The strategy is flat when a long signal should be generated.
Comment
-
Hi, If you go into the strategy builder General Properties>More Properties> enable Trace Orders, then observe the New>NinjaScript Output window after running your strategy you will be able to see ignored orders. Please check if the order is being ignored from this output window.Chris L.NinjaTrader Customer Service
Comment
-
Hi, If you add a Print to your entry order do you see this showing up? Using Print will be the best tool you can use to debug your script because it will show you the data your strategy is processing and you can see when and where your entry signals are being hit e.g.
Code:if(<Entry condition>) { Print("Entry Signal Reached"); //Misc>Print in the builder EnterLongLimit(); }
Chris L.NinjaTrader Customer Service
Comment
-
Hi, thanks for the follow up. You will need to debug your script to find out why no orders are being placed. The output window works and limit orders/stop order work if implemented correctly. Another thing to note about these resting orders is that you need to re-submit them on every bar they should be active, otherwise they will be canceled after the next bar closes. See this example for reference:
https://forum.ninjatrader.com/forum/...der#post806596Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by EnveousColnago, Today, 05:35 AM
|
2 responses
20 views
0 likes
|
Last Post
![]()
by bltdavid
Today, 03:48 PM
|
||
Started by rafaelcoisa, Today, 02:20 PM
|
0 responses
9 views
0 likes
|
Last Post
![]()
by rafaelcoisa
Today, 02:20 PM
|
||
Indicator doesn't show up and no data in the data box are showing under the indicator
by christopher512
Started by christopher512, Today, 02:05 PM
|
0 responses
12 views
0 likes
|
Last Post
![]() |
||
Started by Auchlow, Yesterday, 05:49 AM
|
3 responses
36 views
1 like
|
Last Post
![]()
by sidlercom80
Today, 12:46 PM
|
||
Started by dp8282, Yesterday, 05:05 PM
|
2 responses
28 views
0 likes
|
Last Post
![]()
by dp8282
Today, 08:49 AM
|
Comment