Table of contents : Preface Why This Book? Target Audience Conventions Used in This Book Using Code Examples O’Reilly Online Learning How to Contact Us Acknowledgments 1. Importing and Processing Financial Data in Python Installing the Environment Creating the Importing Algorithm Putting It All Together Summary 2. Algorithmic Mindset and Functions Coding the Primal Functions The Function to Add Columns to an Array The Function to Delete Columns from an Array The Function to Add Rows to an Array The Function to Remove Rows from an Array The Function to Round Numbers Coding Signals Creating the Signal Charts Coding Performance Evaluation Functions The Hit Ratio The Rate of Return The Profit Factor The Risk-Reward Ratio The Number of Trades Creating a Performance Evaluation Function A Hypothetical Example: Appraising Performance 3. Introducing Technical Analysis Charting Analysis Indicator Analysis Moving Averages The Relative Strength Index Pattern Recognition Common Pitfalls of Technical Analysis Wanting to Get Rich Quickly Forcing the Patterns Hindsight Bias, the Dream Smasher Assuming That Past Events Have the Same Future Outcome Making Things More Complicated Than They Need to Be Technical Analysis Best Practices Harness the Power of Different Time Frames Use More Than One Strategy or Indicator Choose the Right Type of Strategy for Current Market Conditions Don’t Underestimate Default Parameters 4. Classic Trend-Following Patterns The Marubozu Pattern The Three Candles Pattern The Tasuki Pattern The Three Methods Pattern The Hikkake Pattern 5. Modern Trend-Following Patterns The Quintuplets Pattern The Double Trouble Pattern The Bottle Pattern The Slingshot Pattern The H Pattern 6. Classic Contrarian Patterns The Doji Pattern The Dragonfly Doji The Gravestone Doji The Flat Doji The Double Doji The Tri Star Doji The Harami Pattern The On Neck Pattern The Tweezers Pattern The Stick Sandwich Pattern The Hammer Pattern The Star Pattern The Piercing Pattern The Engulfing Pattern The Abandoned Baby Pattern The Spinning Top Pattern The Inside Up/Down Pattern The Tower Pattern 7. Modern Contrarian Patterns The Doppelgänger Pattern The Blockade Pattern The Euphoria Pattern The Barrier Pattern The Mirror Pattern The Shrinking Pattern 8. Advanced Candlestick-Charting Systems Heikin-Ashi System Detecting the Doji Pattern Detecting the Tasuki Pattern Detecting the Euphoria Pattern Detecting the Double Trouble Pattern K’s Candlesticks System Detecting the Doji Pattern Detecting the Tasuki Pattern Detecting the Euphoria Pattern Detecting the Double Trouble Pattern 9. Candlestick Patterns Exit Techniques The Symmetrical Exit Technique The Fixed Holding Period Exit Technique The Variable Holding Period Exit Technique The Hybrid Exit Technique Pattern Invalidation 10. Candlestick-Based Trend-Following Strategies Combining the Double Trouble Pattern with the RSI Combining the Three Candles Pattern with Moving Averages Combining the Bottle Pattern with the Stochastic Oscillator Combining the Marubozu Pattern with K’s Volatility Bands Combining the H Pattern with the Trend Intensity Index 11. Candlestick-Based Contrarian Strategies Combining the Doji Pattern with the RSI Combining the Engulfing Pattern with Bollinger Bands Combining the Piercing Pattern with the Stochastic Oscillator Combining the Euphoria Pattern with K’s Envelopes Combining the Barrier Pattern with the RSI-ATR 12. Risk Management and Trading Psychology Basics of Risk Management Stops and Targets Trailing Stops Position Sizing Economic Calendar Behavioral Finance: The Power of Biases Cognitive Biases Emotional Biases Trading Framework Index About the Author