In this video, we automate the ascending triangle pattern detection in Python and turn it into a complete trading strategy. We then run a backtest on Gold prices (5-minute timeframe, 57 trading days) with results reaching 383% returns and an 86% win rate using leverage.
You’ll learn step by step how to:
- Detect pivot points (swing highs and lows)
- Build the ascending triangle pattern algorithm in Python
- Avoid look-ahead bias in your backtests
- Run a full automated trading strategy backtest
- Experiment with parameters for different assets
╔═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦══╦═╦═╦══╦═╦═╦══╦═╦═╦
📘 Book available on Amazon (Algorithmic Trading Hands-On Approach Using Python):
https://a.co/d/6woMBHt
💲 My Algorithmic Trading Course In Python for all levels (Udemy Sale Coupons):
https://www.codetradingcafe.com/
Happy learning, happy coding ☕
╚═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩
📌 Download the Python code for FREE from the link and test it yourself:
https://github.com/ZiadFrancis/AscendingTrianglesBacktest
00:00 Ascending Triangles Introduction and Results
00:34 Triangle Pattern Detection Examples On Price Charts
00:59 Swing High and Swing Low Detection
02:00 Detecting Triangle Pattern Algorithm
02:50 Python Code Walkthrough
11:13 Coding The Strategy And Trade Management
#algorithmictrading #trading #autotradingsoftware #backtesting #python