Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
order handling. per group in strategy
Collapse
X
-
order handling. per group in strategy
i have multiple groups in multiple sets in a strategy. is there a way to set order handling 1 entry per unique entry - per each group in each set? every group is an entry condition. i don't want the entry condition to trigger again after it has executed once.Tags: None
-
Hello SteveReiza,
Thanks for your post.
NinjaTrader does have an EntryHandling property but when EntryHandling is set to EntryHandling.UniqueEntries, NinjaScript will process order entry methods until the maximum allowable entries set by the EntriesPerDirection property per each uniquely named entry.
For example, if you have two entry order methods using unique signal names ("entry1" and "entry2"), set EntriesPerDirection to 1, and use EntryHandling.UniqueEntries, a maximum number of 1 entry order will be processed for each uniquely named entry order (up to 1 order for "entry1" and 1 order for "entry2").
EntryHandling: https://ninjatrader.com/support/help...ryhandling.htm
EntriesPerDirection: https://ninjatrader.com/support/help...rdirection.htm
Otherwise, you would need to implement your own custom logic using a bool to limit when trades are placed by the script. For example, if you only want the Entry order to be placed once per day, you would need to use a bool to control that. You could create a bool, initially set to true, and check if the bool is true in your condition to place the order. Then, set the bool to false after placing the entry order. The bool could be reset to true when IsFirstBarOfSession is true to reset it on the first bar of a new session.
IsFirstBarOfSession: https://ninjatrader.com/support/help...rofsession.htm<span class="name">Brandon H.</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>
-
thanks for the reply. i kinda jive with entries per direction unique entries or all entries.
i have a strategy that has an entry condition for a short trade that is close [0] = (high[0] + (-40*ticksize)). if the price drops a few ticks then goes back up to the -40 mark, will it re-enter the trade? or, because the position is already open from that - it won't, because that's what i'd like. if i have order handling set to 1 for entries per direction unique entry i'll block out the next entry in the strategy in the next group won't I? because, its using the same entry name (same strategy)?
is there a way to make it so just that group has a 1 for entries per direction 1 unique entry?
does unique entry mean just that execution on that signal name for that entry condition? or does it mean only for that strategy, all entry conditions?
Comment
-
Hello SteveReiza,
Thanks for your notes.
No, there is no options available to set EntriesPerDirection/EntryHandling for specific condition groups in a strategy.
If you are submitting an order for each condition group and each entry order method has a unique signal name, when EntryHandling.UniqueEntries is used and EntriesPerDirection is set to 1, each entry order method with a unique signal name could be submitted if the condition groups become true.
Say an entry order method that has the unique signal name of say 'Entry1' is placed. If EntryHandling is set to EntryHandling.UniqueEntries and EntriesPerDirection is set to 1, another order would not be placed if that same condition becomes true to place an order with that same signal name.<span class="name">Brandon H.</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
-
okay, awesome. i think i'm tracking.
so, the same signal name could be used again with another set of order methods?
Comment
-
Hello SteveReiza,
Thanks for your notes.
If the same signal name is being used in another Entry order method and the strategy already placed an entry order that uses that signal name, the other order would not be placed since it is not a unique signal name, and an order with that signal name is already placed.
EntryHandling: https://ninjatrader.com/support/help...ryhandling.htm
EntriesPerDirection: https://ninjatrader.com/support/help...rdirection.htm
<span class="name">Brandon H.</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
-
thanks for the reply.
okay i'm tracking. since the signal name isn't unique to those entry methods and its already been applied - it won't allow another entry method to execute because it would use that signal name.
can i edit manually the code. and, put the enter short below each entry method with a unique name?
Comment
-
Hello SteveReiza,
Thanks for your notes.
The code you shared a screenshot of would be the correct way to call two Entry order methods with unique signal names to enter a short position.
Since one Entry order method has the signal name "goShort" and the other Entry order method has the signal name "goShort2" this would be considered each order method having a unique signal name.<span class="name">Brandon H.</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
-
thanks for the reply. alright cool cool. i think i have it. i have a bool set up for every entry method for onfisttick. so it won't enter a trade again on the same bar.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
54 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
72 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment