I'm looking to enter long on a trade if I have a bullish engulfing. I have that set up already in strategy builder. I'm having trouble adding the condition of how to only enter the trade if a BEARISH engulfing is NOT present in the previous "x" amount of bars. Please assist. Thanks!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Enter Trade if chart patten not present
Collapse
X
-
Enter Trade if chart patten not present
Hello,
I'm looking to enter long on a trade if I have a bullish engulfing. I have that set up already in strategy builder. I'm having trouble adding the condition of how to only enter the trade if a BEARISH engulfing is NOT present in the previous "x" amount of bars. Please assist. Thanks!
Tags: None
-
Hello joeyfreshwater,
Thank you for your post.
It's a little tricky, but you can do this by using the MAX indicator with a user input to control how many bars back we look at what's returned from the instance of the CandleStickPattern indicator. Basically, on the right side of the condition builder you would select the MAX indicator. For the input series, click on that field and select CandleStick Pattern indicator. Set Bearish Engulfing to the pattern for this. I selected a trend of 0, so it only looks at the bars themselves.
Click OK, and then in the Period field for the MAX indicator, you can either put in a integer of your choosing for how many bars back you want to not have had a Bearish Engulfing for, or you can use an int user input for that so the user can control it at run time.
Then, in the center choose Equals, and on the right choose 0. Since the CandleStickPattern indicator can only return a 0 or a 1, the MAX returning 0 means there was no pattern returned during that period of bars.
I'm attaching an example Strategy Builder script below that demonstrates.
Please let us know if we may be of further assistance to you.Attached Files
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
47 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
23 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
33 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
51 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment