Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Avoid duplicate orders
Collapse
X
-
Avoid duplicate orders
I have a strategy that is calling EnterLongLimit when conditions are met. The problem is that it contiues to enter the order on every bar until the exit condition is reached. The position grows in size with each bar/fill. Is there a simple way to avoid this without having to write the strategy to track which orders have been submitted/filled? I started looking at OnOrderUpdate but that seems to be overly an complicated path to follow for this simple requirement.Tags: None
-
Hello Brillo,
For enter orders, you should first look into the properties EntriesPerDirection and EntryHandling. They're available whenever you run a strategy in our managed framework. You should be able to set these to only allow so many orders submitted per direction.
Ryan M.NinjaTrader Customer Service
-
I have set it to be
EntryHandling = EntryHandling.UniqueEntries;
It's also set to that in the properties dialog for the chart/strategy. I still get mujltiple entries with the same name. On my chart I have "LE3" or "SE3" over and over until the position is closed.
Comment
-
My appologies. EntryHandling = EntryHandling.UniqueEntries is behaving as designed... it limits the entries to the number specified by the
EntriesPerDirection.
Thank you, it's helpful. However, there are situations where I want to have a scalling entry approach that is confiurable such as this:
Entry Name - Number of contracts:
LE1 1
LE2 1
LE3 2
LE4 4
Four entries with a growing number of contracts submitted for each. How can I achieve that?
Comment
-
It looks like you're almost there. You can scale in multiple contracts using EntryHandling = UniqueEntries and providing unique signal names each time you want to scale in.
With EntiesPerDirection set to 1 and UniqueEntries, then it allows 1 entry per direction for each uniquely named rule.
A basic scale out sample is available here:
Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
81 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
41 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
64 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
66 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
54 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment