Flag and Pennant Pattern Recognition in Python | Algorithmic Trading Strategy

Published: 14 March 2023
on channel: neurotrader
15,643
484

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.


On this page of the site you can watch the video online Flag and Pennant Pattern Recognition in Python | Algorithmic Trading Strategy with a duration of hours minute second in good quality, which was uploaded by the user neurotrader 14 March 2023, share the link with friends and acquaintances, this video has already been watched 15,643 times on youtube and it was liked by 484 viewers. Enjoy your viewing!