Summary
Keywords
Full Transcript
In this video, I backtest a Pin Bar (Rejection Candle) strategy on 6 years of Gold (XAUUSD) historical data using Python fully automated, no manual chart reading. Here's what we cover: What a pin bar is and how to detect it programmatically, The exact detection rules (wick ratio, body size, candle range), A trend filter using EMA 50 & EMA 200 to qualify signals, ATR-based stop loss placement and a fixed 2:1 reward-to-risk ratio. Auto-closing trades after 50 candles if neither target is hit, Full backtest results on XAUUSD 6 years of data. ╔═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦══╦═╦═╦══╦═╦═╦══╦═╦═╦ 🔗 Resources & Links: -------------------------------------- • 📚 My Algorithmic Trading Courses → https://codetradingcafe.com • 📘 My Book: “Algorithmic Trading with Python” → https://a.co/d/6woMBHt • 💻 Free Python Code (GitHub) → https://github.com/ZiadFrancis/PinBar_XAUUSD Happy learning, happy coding ☕ ╚═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩ 0:00 Introduction 1:03 Trend Filter Explanation 2:01 Python Code Overview 3:00 Phase One: Pin Bar Detection 5:00 Backtesting Phase One 7:02 Phase Two: Trend Filter 9:00 Backtesting Phase Two 11:00 Results Comparison #algotrading #pinbar #XAUUSD #pythontrading #backtesting #gold #tradingstrategy
