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 NullPointStrategies, Today, 05:17 AM
|
0 responses
49 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
67 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