I could use some assistance regarding using Strategy Builder to stop my strategy from re-entering a trade on the same bar that a stop loss exited the trade on. Thank you.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Stop entry after stop loss
Collapse
X
-
Stop entry after stop loss
Hello
I could use some assistance regarding using Strategy Builder to stop my strategy from re-entering a trade on the same bar that a stop loss exited the trade on. Thank you.Tags: None
-
Hello jhjhawkins,
Thank you for your post.
You could create a condition group in your entry conditions that checks whether or not it's been at least 1 bar since the last exit:
This will check whether it's either been at least 1 bar since the last exit or that no exits have been submitted yet from the strategy. You can find Bars Since Exit in the Misc folder in the condition builder. Adding this to your conditions for entry would keep the entry from being fired off on the same bar as the prior exit.
Please let us know if we may be of further assistance to you.
-
BarsSinceExecution = -1, that was what had me. Thank you very much. Just out of curiosity is there a way to make this apply to only Stop Loss exits?
Comment
-
Hello jhjhawkins,
Thank you for your reply.
You can add the Signal Name "Stop loss" for the Bars Since Exit Signal name to tie it to those specific executions if you're using SetStopLoss to make the stop. If a profit target closes the position that'll be more than 1 bar from a Stop Loss anyway.
Please let us know if we may be of further assistance to you.
Comment
-
Hi Kate,Originally posted by NinjaTrader_Kate View PostHello jhjhawkins,
Thank you for your reply.
You can add the Signal Name "Stop loss" for the Bars Since Exit Signal name to tie it to those specific executions if you're using SetStopLoss to make the stop. If a profit target closes the position that'll be more than 1 bar from a Stop Loss anyway.
Please let us know if we may be of further assistance to you.
I'm trying the same thing and probably not entering the right things.
1. Use startegy analyzer and trailing stop.
2. I want to not enter another trade for 3 bars only when stop loss triggers.
3. I tried the signal loss name in both long exit condition group as above and condition using the same name in trailing stop
Would you mind helping on how to match entry condition with trailing stop? Thanks.
Comment
-
Hello rocketstock,
Thank you for your inquiry.
I see that you have put "StopLoss" as the entry signal in your Trailing Stop order. This field could be left blank like in the screenshot below:
World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.
The "From entry signal" field for the Trailing Stop is described as "The entry signal name. This ties the trail stop exit to the entry and exits the position quantity represented by the actual entry. Using an empty string will attach the exit order to all entries." This field is optional, however, if you do choose to use an entry signal make sure it matches the entry signal attached to your entry order (if one was used). The value you put here is not attached to the BarsSinceExitExecution() in your condition at all.
Additionally, a Trailing Stop has a different signal name than a Stop Loss; if you use the signal name "Trail stop" this should work properly with BarsSinceExitExecution(). This is mentioned as the final bullet point under "Tips" on the help guide page here:
Here is an example of how you would want to set up the condition group on your entry order to make sure an entry is not submitted unless 3 bars have passed since your Trailing Stop was filled:
World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.
For additional information on BarsSinceExitExecution(), please refer to the page here:
Please let us know if we may be of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment