This section contains examples which show how to work with Candlestick pattern indicators - how to:
- Find a pattern by shift and by candlestick bar interval.
- Find the latest occurrence of the pattern.
- Plot patterns on chart - both single and multiple.
- Use designated set of candlestick patterns in the same strategy.
- Use all 61 candlestick patterns in the same strategy.
Use hammer pattern
CandlePatternsHammer strategy shows how to use hammer pattern within a strategy:
- On its start (i.e. in the onStart method) it finds hammer pattern occurrences over the last 100 candlesticks and prints to console the latest occurrence by shift.
- On every candlestick (i.e. in the onBar method) it checks if it is of hammer pattern.
Also the strategy plots the indicator on chart: