DaveN
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Limit Orders in Automated Trading
Collapse
X
-
Limit Orders in Automated Trading
I have been experimenting with using limit orders to enter or exit an order withing a strategy wizard generated ninjascript. It seems that sometimes a limit order is left in place for a long time, while other times it seems to be replaced by a different limit order. What I think is going on is when the next bar conditions change such that a new limit order results, it places that order and cancels the old one. If conditions don't change that would generate a new order, the old order persists. Is this accurate? How long will a limit order persist when placed by an automated strategy? Is there any way within the strategy wizard to cancel the order after some period of time or some number of bars?
DaveNTags: None
-
Limit Orders continued
I have one other question related to this thread. When I run my strategy, I sometimes get a message which also cancels the strategy. The message is something like, "order rejected, you cannot place a buy order above the market". I have been using stop orders to trigger a buy or sell, based on the location of a moving average. Is there a different order type I should be using to enter a position since it really doesn't like what I'm doing right now?
DaveN
-
If the limit order is left in place for a long time, it would indicate the market did not fill the order yet. Depending on what setting is used for TIF (time in force), orders will be active until cancelled or are cancelled at the end of the day. For example, if you would use GTC (good till cancelled), the limit order will be working untill it fills.
Unfortunately, it is not possible to cancel the order after some period or number of bars using the Strategy Wizard; you will need to custom code the strategy to establish this.
As per your second post, it seems your strategy submits a sell stop order above the market or a buy stop order below the market; this is not possible. I suggest to submit a limit order instead.JasonNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
61 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
9 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
18 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
5 responses
48 views
0 likes
|
Last Post Today, 02:36 PM |
Comment