Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Candlestick Patterns
Collapse
X
-
Candlestick Patterns
Hello i am developing a strategy and y want to enter in the market when a bullish engulfing pattern appear . could you help me? thanksTags: None
-
Hello jerryblack,
Thanks for your post.
I would suggest using the indicator CandleStickPattern in your Ninjatrader platform in conjunction with the Strategy Builder to create this.
If you are not familiar with the indicator, please create a chart and apply the indicator and select the bullish engulfing pattern. Where you see the pattern, the indicator would have also output a hidden plot that has a value of 1 when the pattern is found. In the strategy builder, you would use the indicator and check to see if its plot is equal to a value of 1 which would be your trigger to then place an order.
If you are not familiar with the Strategy Builder, please use these resources to increase your knowledge before attempting:
Free live webinar every other Thursday at 4:00 PM EST, through this link to all webinars: https://ninjatrader.com/PlatformTraining
Previous recording of the Strategy Builder 301 webinar: https://youtu.be/HCyt90GAs9k?list=PL...auWXkWe0Nf&t=2
Help guide for the strategy builder: https://ninjatrader.com/support/help...gy_builder.htm
- Likes 1
-
Hello ablack,
Thanks for your post and welcome to the Ninjatrader forums!
The indicator CandlsStickPattern has a Transparent plot that is provided for the purpose of signaling to a strategy (or the market analyzer) when a pattern has been found. The plot value is normally zero when no pattern is found and will be a value of 1 when the pattern is detected.
Based on your screenshot, in your condition set, on the right side select Misc folder then Numeric Value, and enter the value of 1.
As the strategy processes bar by bar, once the pattern is detected the condition would be true and your actions would be performed.
Comment
-
-
Hello councilsoft,
Yes you would need to make a custom version of the candlestick pattern indicator. That indicator is a little more complex to copy because it uses a custom class near the bottom of the file.
To make a copy:- Open the original indicator and right click -> save as.
- In the new files OnStateChange State.SetDefaults change the Name = ""; to a custom name you like.
- Do a find and replace for CandleStickPatternLogic to something custom like MyCandleStickPatternLogic
- Do a find and replace for ChartPattern to something custom like MyChartPattern
You can then add new selections to the ChartPattern enum and then the associated price conditions inside the MyCandleStickPatternLogic class similar to the existing patterns.
Comment
-
ok thanks, that's exactly what I did. Thanks for confirming. Can you tell me what's the Evaluate function is for?
Also this specific section
// no pattern found on the last 2 bars
Comment
-
Hello councilsoft,
That is a function in the class at the bottom of the file, that's where the checking for patterns happens. You can essentially ignore all of the normal indicator code in OnBarUpdate, the place to focus would be inside the evaluate method near the bottom where the other patterns are being checked.
The no pattern found in 2 bars is part of how the indicator normally works to check for patterns. Below that comment is where the patterns would be added. You can additionally add the pattern into OnbarUpdate similar to the other conditions if you wanted to visually mark the chart. For the strategy use you need to edit the Evaluate method and add the pattern in there so that the first line of OnBarUpdate works to set the plot for that pattern when found.
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