Flag and Pennant Pattern Recognition in Python | Algorithmic Trading Strategy
neurotrader neurotrader
16.2K subscribers
11,453 views
0

 Published On Mar 14, 2023

We automate the flag and pennant chart patterns with python and show the code. Then backtest the performance of the patterns. We use the algorithms shown in my previous videos to build rule based pattern recognition. The pattern recognition is rather lenient to detect many patterns. Both of the chart patterns describe a brief interruption in a trend before continuing. A continuation pattern they call it. I show two different identification algorithms. The size of the patterns found can be controlled with a single parameter. Both pattern recognition systems share similar results. The identified bear and bull flags performed quite well as an entry point for trades using hourly bitcoin data. While the bull and bear pennants are not very consistent. The pennants are found more rarely than the flags. The win rates of the bear and bull flags are above 60% on many of the parameter values and are consistent across parameter values suggesting robustness of the pattern.

I do not cover the rolling window, perceptually important point, or trend line algorithms used in this video. But I do in these videos:

Chart Pattern Algorithms:    • 3 Must-Know Algorithms for Automating...  
Trend Line Algorithm:    • Automated Price Trend Lines in Python...  

Full Code: https://github.com/neurotrader888/Tec...
Patreon:   / neurotrader  


The content covered on this channel is NOT to be considered as any financial or investment advice. Past results are not necessarily indicative of future results. This content is purely for education/entertainment.

show more

Share/Embed