Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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
Paul H.NinjaTrader Customer Service
- 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.Paul H.NinjaTrader Customer Service
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.JesseNinjaTrader Customer Service
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.JesseNinjaTrader Customer Service
Comment
-
I totally get it. Getting into candlestick patterns can be a bit overwhelming at first. While I'm aware this answer is coming a bit late, for others who might have the same question, I stumbled upon a helpful webpage called Alphaexcapital. They have some solid tips for profitable Forex trading, including insights on bullish engulfing patterns. Remember, a bullish engulfing pattern can signal a potential trend reversal, so it's great that you're incorporating it into your strategy. Make sure to combine it with other indicators and consider factors like volume and market conditions for more accurate entries. As a newbie on this forum, I'm here to help. If you have any more questions or need further guidance, feel free to ask.Last edited by Harynalivu; 05-27-2023, 02:35 AM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by yertle, Yesterday, 08:38 AM
|
7 responses
28 views
0 likes
|
Last Post
by yertle
Today, 12:15 AM
|
||
Started by bmartz, 03-12-2024, 06:12 AM
|
2 responses
21 views
0 likes
|
Last Post
by bmartz
Today, 12:11 AM
|
||
Started by funk10101, Today, 12:02 AM
|
0 responses
5 views
0 likes
|
Last Post
by funk10101
Today, 12:02 AM
|
||
Started by gravdigaz6, Yesterday, 11:40 PM
|
1 response
9 views
0 likes
|
Last Post Yesterday, 11:49 PM | ||
Started by MarianApalaghiei, Yesterday, 10:49 PM
|
3 responses
11 views
0 likes
|
Last Post Yesterday, 11:33 PM |
Comment