Free Download Price Action Trading Strategies Using Python By QuantInsti
Price Action Trading Strategies Using Python
Strengthen your understanding of price action trading with this detailed course designed to teach you how to recognize and trade key market patterns such as double tops/bottoms, triple tops/bottoms, and head & shoulders formations. Learn practical trading methods and master price action tools including pivot points and Fibonacci retracements. The course offers downloadable codes and strategies, enabling you to refine, customize, and apply them directly in live market conditions.
APPLY PRICE ACTION TRADING STRATEGIES
-
Explain the reasoning behind price action trading and its common techniques.
-
Conduct supply and demand evaluations to detect market zones with concentrated buying or selling interest.
-
Recognize and analyze reversal chart structures including head & shoulders, inverse head & shoulders, double top, double bottom, triple top, triple bottom, and n-top/n-bottom patterns.
-
Discuss the logic behind continuation patterns such as triangles, flags, and pennants.
-
Develop practical trading strategies by identifying ideal entry and exit points for the patterns introduced.
-
Explore the role of support and resistance, creating straightforward methods to profit in sideways-moving markets.
-
Apply additional tools like pivot points and Fibonacci retracements to uncover hidden support and resistance levels.
-
Create pivot point strategies suitable for both trending and ranging markets.
-
Use Fibonacci retracement levels to detect potential reversal zones and position accordingly during trending phases.
-
Carry out price action analysis across different timeframes such as 15-minute, 1-hour, daily, and weekly charts.
SKILLS REQUIRED TO LEARN PRICE ACTION TRADING
Concepts
-
Supply and Demand Analysis
-
Reversal and Continuation Patterns
-
Support and Resistance
-
Pivot Points: Classic, Woodies, Camarilla
Strategies
-
Head and Shoulders
-
Double & Triple Top
-
Range Trading with Pivots
-
Trend Following with Pivots
-
Fibonacci Retracement
Python
-
Pandas
-
Numpy
-
Matplotlib
-
Resample
LEARNING TRACK 2
This course is included in the broader program: Technical Analysis Using Quantitative Methods.
PREREQUISITES TO LEARN PRICE ACTION TRADING
Before enrolling, learners should have a clear understanding of how financial markets operate. Basic Python knowledge is essential, particularly familiarity with libraries like Pandas and the ability to manage Pandas dataframes. A grasp of key trading terms such as long, short, stop-loss, and take-profit levels is necessary. Additionally, prior experience with trading or charting platforms will provide an extra advantage.
PRICE ACTION TRADING STRATEGIES COURSE
Introduction
This course will serve as a step-by-step guide to assist you with the use of various price action tools and methodologies. The interactive methods used in this course will help you not only understand the concepts but also answer all questions about price action trading. This section also covers the course structure as well as the various teaching tools used in the course, such as videos, quizzes, coding exercises, and the capstone project.
- Introduction 5m 25s
- Course Structure 2m
- Quantra Features and Guidance 4m 9s
- FAQs 2m
Basics of Price Action Trading
Technical indicators are commonly used to determine a stock’s price trend in order to take a trading decision. Is there a way to do this without using technical indicators? Yes, you can use the concept of price action trading. In this section, you will learn about the basics of price action trading.
- Price Action Trading 1m 35s
- Create Trading Strategy 5m
- What is Price Action Trading? 5m
- Price Action Trading: Tools 5m
- Trading and Investing 5m
- Additional Reading on Price Action Trading 2m
Supply and Demand Analysis
Supply and demand analysis is a tool used in price action trading. In this section, you will learn about the demand and supply forces. You will learn how to identify the demand and supply zones and take trades based on these zones.
- Supply and Demand Analysis 3m 15s
- Price Movement 5m
- Supply and Demand 5m
- Rise in Demand 5m
- Identify the Zone 5m
- Identify Supply Zone 5m
- Entry Price 5m
- Trading Decision 5m
- Supply and Demand Zone 5m
- Demand Zone 5m
- Supply Zone 5m
- Additional Reading on Supply and Demand Analysis 2m
- Test on Supply and Demand Analysis 10m
Head and Shoulders Pattern
When the price enters the supply or demand zone, do you think it directly reverses as soon as it enters that zone? Not really. The price forms a pattern according to the price behaviour before it reverses. This pattern is known as a reversal pattern. In this section, you will learn about one of the most well-known patterns known as the head and shoulders pattern.
- Head and Shoulders Pattern 3m 39s
- Supply and Demand Zones 5m
- Chart Patterns 5m
- Formation of Head and Shoulders Pattern 5m
- Components of Head and Shoulders Pattern 5m
- Trading Head and Shoulders Pattern 1m 42s
- Entry for Head and Shoulders Pattern 5m
- Stop-Loss for Head and Shoulders Pattern 5m
- Take-Profit for Head and Shoulders Pattern 5m
- Short Position 5m
- Additional Reading on Head and Shoulders Pattern 2m
FAQs on Head and Shoulders Pattern
Can the head and shoulders pattern have unequal shoulders? Can the head and shoulders pattern have a slanted neckline? You will find the answers to all such questions in the section.
- Variations in Shoulders 2m 56s
- Valid Head and Shoulders Pattern-I 5m
- Left and Right Shoulders 5m
- Stop-Loss above Right Shoulder 5m
- Stop-Loss for Unequal Shoulders 5m
- Commonly Asked Questions 4m 9s
- Valid Head and Shoulders Pattern-II 5m
- Distance Between Points 5m
- Entry for Slanted Neckline 5m
- Take-Profit for Slanted Neckline 5m
- Price Trend 5m
- FAQ on Head and Shoulders Pattern 2m
Detecting Head and Shoulders Pattern
Knowing how to trade the head and shoulders patterns is important. But, in order to trade the pattern, you need to detect it first. Through this section, you will learn how to detect the head and shoulders pattern in python.
- How to Use Jupyter Notebook? 2m 5s
- Local Minima and Maxima 2m
- Identify Local Minima and Maxima 5m
- How to Use Interactive Exercises? 5m
- Indices of Local Minima Points 5m
- Get the Local Minima Values 5m
- Detecting Head and Shoulders 5m
- H&S Minima and Maxima Points 5m
- Relation Between H&S Coordinates 5m
- Validity of H&S Pattern 5m
Backtesting Head and Shoulders Pattern
With backtesting, we can evaluate any of our trading strategies objectively. It helps to assess the viability of the trading strategy. In this section, you will learn how to backtest the head and shoulders pattern. You will learn how to record the details of all the trades taken by generating a trade sheet.
- Head and Shoulders: Entry and Exits 5m
- Confirmation of H&S Pattern 5m
- Backtesting Head and Shoulders Pattern 5m
Performance Analysis
To understand whether your strategy is working, you need to analyse certain metrics. In this section, you will learn how to evaluate the trade level metrics to depict how well the strategy has performed over a certain period of time, as well as evaluate the performance of your strategy based on returns, risk and both.
- Trade Level Analytics 5m
- Average PnL Per Trade 5m
- Win Percentage 5m
- Average Trade Duration 5m
- Performance Metrics 5m
- CAGR 5m
- Sharpe Ratio 5m
- Maximum Drawdown 5m
- Additional Reading on Performance Analysis 10m
Transaction Costs and Slippage
The journey towards building a good backtest for a strategy idea is incomplete without considering the transaction costs and slippages. In simple words, transaction costs encompass brokerage, commission, etc. Slippage is the difference between the expected and executed price. Learn these concepts and understand how to incorporate them into your trading strategy in this section.
- Transaction Costs and Slippage 2m 31s
- Calculation of Transaction Cost 2m
- Calculation of Slippage 2m
- Implementation of Transaction Cost and Slippage 5m
- Additional Reading 10m
Inverse Head and Shoulders Pattern
A reversal pattern can either be bullish or bearish. In this section, you will learn about a bullish reversal pattern called the inverse head and shoulders pattern. You will learn how this pattern is formed and how you can trade this pattern by determining entry and setting stop-loss and take-profit levels.
- Inverse Head and Shoulders Pattern 2m 13s
- Difference Between Patterns 5m
- Formation of Inverse Head and Shoulders 5m
- Entry for Inverse Head and Shoulders Pattern 5m
- Stop-Loss for Inverse Head and Shoulders Pattern 5m
- Take-Profit for Inverse Head and Shoulders Pattern 5m
- Detect the Inverse Head and Shoulders Pattern 5m
- Min_Max Function 5m
- Scan The Pattern 5m
- Store The Pattern 5m
- Backtest the Inverse Head and Shoulders Pattern 5m
- Test on Head and Shoulders 12m
Double Top Pattern
In this section, you will learn the double top pattern. You will learn about the formation and the price action of this pattern. Further, you will also learn how to trade this pattern and how you can implement it in python.
- Double Top Pattern 3m 17s
- Double Top Pattern Components 5m
- Double Top Pattern Condition 5m
- Double Top Pattern Formation 5m
- Entry for Double Top Pattern 5m
- Stop-Loss for Double Top Pattern 5m
- Take-Profit for Double Top Pattern 5m
- Detect the Double Top Pattern 5m
- Scan the Double Top Pattern 5m
- Calculate Stop-Loss Programmatically 5m
- Calculate Take-Profit Programmatically 5m
Double-Bottom Pattern
A double bottom pattern is an indicator of a bullish reversal. In this section, you will learn how the pattern is formed and the points that you need to keep in mind while trading on the basis of this pattern. You will also learn about the entry and exit conditions of the double bottom pattern strategy.
- Double-Bottom Pattern 2m
- Shape of the Pattern 5m
- Indication of the Pattern 5m
- Stop-Loss Level 5m
- Entry and Exit Condition 5m
- Detect the Double Bottom Pattern 5m
- Neck of the Double-Bottom Pattern 5m
- First Bottom of the Double-Bottom Pattern 5m
- Two Bottoms of the Double-Bottom Pattern 5m
Triple and n-Top Patterns
Is it possible to have a reversal pattern with more than two tops? What are the maximum number of tops that a reversal pattern can have? This section will answer these questions. In, this section you will learn about the triple and n-top patterns. You will also learn about the formation and price action of these patterns.
- Triple and n-Top Pattern 2m
- n-Top Pattern 5m
- Triple Top Pattern 5m
- Determine Entry for n-Top Pattern 5m
- Stop-Loss for n-Top Pattern 5m
- Take-Profit for n-Top Pattern 5m
- Detect the Triple Top Pattern 5m
- Generating Short Signals 5m
- Filtering Short Signals 5m
- Take-Profit of Triple-Top Pattern 5m
- Additional Reading on Reversal Patterns 2m
Triple-Bottom Pattern
A triple bottom pattern is a strong indicator of a bullish reversal. In this section, you will learn how the pattern is formed, how to trade with this pattern and what are the things that you should keep in mind while implementing a triple bottom pattern strategy.
- Triple-Bottom Pattern 2m
- Describe the Triple-Bottom Pattern 5m
- Identify the Stop-Loss 5m
- Entry and Exit Conditions 5m
- Detect the Triple Bottom Pattern 5m
- Scan the Triple-Bottom Pattern-1 5m
- Scan the Triple-Bottom Pattern-2 5m
- Take-Profit of the Triple-Bottom Pattern 5m
- Test on Reversal Chart Patterns 10m
Continuation Patterns
The prices of an asset may continue the price trend after forming a pattern instead of reversing. Such patterns that indicate that the price will move in its original direction are known as continuation patterns. In this section, you will learn about the basics of continuation patterns and how they are formed.
- Continuation Patterns 2m 24s
- Consolidation Phase 5m
- Trend Reversal 5m
- Trend Continuation 5m
- Types of Continuation Patterns 5m
- Additional Reading on Continuation Patterns 2m
Triangle Pattern
This section explains a continuation pattern known as the triangle pattern. Through this section, you will learn how a triangle pattern is formed. You will also learn about the different types of triangle patterns and further understand the price action of these patterns.
- Triangle Pattern 2m 14s
- Characteristic of Triangle Pattern 5m
- Types of Triangle Patterns 5m
- Features of Triangle Patterns 5m
- Trading Decision 5m
- Symmetric Triangle Pattern 5m
Flag Pattern
This section explains a continuation pattern known as the flag pattern. Through this section, you will learn how a flag pattern is formed. You will also learn about the different types of flag patterns such as the bull flag and bear flag patterns. Further, you will understand the price action of these patterns.
- Flag Pattern 3m 33s
- Identify the Pattern 5m
- Types of Flag Patterns 5m
- Bear Flag Pattern 5m
- Bull Flag Pattern 5m
Pennant Pattern
This section explains a continuation pattern known as the pennant pattern. Through this section, you will learn how a pennant pattern is formed. You will also learn about the different types of pennant patterns and further understand the price action of these patterns. You will also understand the differences and similarities between the pennant and the symmetric triangle pattern.
- Pennant Pattern 2m 38s
- Characteristics of Pennant Pattern 5m
- Bull Pennant Pattern 5m
- Bear Pennant Pattern 5m
- Differences Between Patterns 5m
- Similarities Between Patterns 5m
- Test on Continuation Patterns 10m
Support and Resistance
Support and resistance levels are one of the core tools used by price action traders, especially during the sideways phases. In this section, you will learn to uncover these hidden demand and supply levels within price charts. And further, you will also learn to programmatically identify and mark these levels in the price charts.
- Support and Resistance 4m 58s
- Important Price Zone – I 2m
- Important Price Zone -II 2m
- Check the Support Level 2m
- Check the Resistance Level 2m
- Support and Resistance Zones 2m
- Rationale Behind Support and Resistance 2m
- Setting the Stop Loss level 2m
Strategy Using Support and Resistance
Detecting support and resistance levels in itself is not sufficient. Through this section, you will learn to use this information to your advantage, by implementing a simple trading strategy based on the support and resistance levels.
- Support and Resistance in Action 6m 52s
- Taking Trades 2m
- Exit Condition 2m
- Detecting Support and Resistance Levels 5m
- Backtesting Support Level Strategy Logic 2m
- Backtesting Support Level 5m
- Test on Support and Resistance Strategy 10m
Live Trading on Blueshift
Learn how you can take your backtested strategy live with some important steps. Learn about the code structure, the various functions used to create a strategy, and finally, paper or live trade on Blueshift.
Section Overview 2m 19s
- Live Trading Overview 2m 41s
- Vectorised vs Event Driven 2m
- Process in Live Trading 2m
- Real-Time Data Source 2m
- Blueshift Code Structure 2m 57s
- Important API Methods 10m
- Schedule Strategy Logic 2m
- Fetch Historical Data 2m
- Place Orders 2m
- Backtest and Live Trade on Blueshift 4m 5s
- Additional Reading 10m
- Blueshift Data FAQs 10m
Live Trading Template
Blueshift Live Trading Template
- Paper/Live Trading Support Strategy 2m
- FAQs for Live Trading on Blueshift 5m
Pivot Points
Pivot points were even used by floor traders to automatically find areas of support and resistance based on certain pre-defined calculations. In this section, you will familiarise yourself with this popular price action tool and understand how to implement it to improve your trading.
- Pivot Points 4m 29s
- Pivot Points in Trading 5m
- Calculate the Pivot Point 5m
- Position of the Pivot Point 5m
- Support and Resistance Levels – I 5m
- Support and Resistance Levels – II 5m
- Trading Positions 5m
- Benefits of Pivot Points 5m
- Compute and Visualise Pivot Points 5m
- Additional Reading on Pivot Points 2m
Types of Pivot Points
While the standard/traditional pivot points are the most widely used pivot trading systems, there also exist a few more kinds of pivot points. In this section, you will learn about the most significant types of pivot points and the ideal timeframes for using each one of them.
- Types of Pivot Points 3m 44s
- Similarity in Pivot Points 5m
- Traditional vs Woodie’s Pivots 5m
- Pivot Trading Systems 5m
- Woodie’s Pivots 5m
- Visualise Woodie’s Pivots 5m
- Camarilla Pivots 5m
- Traditional vs Camarilla Pivots 5m
- Visualise Camarilla Pivots 5m
- Additional Reading on Types of Pivot Points 2m
Woodie’s Range Trading
In this section, we will design a range trading strategy based on Woodie’s pivots from scratch. You will also learn to resample data into various frequencies and use the same to refine your trading signals.
- Range Trading using Woodie’s Pivots 2m
- Range Trading 5m
- Range Trading Framework 5m
- Buying Levels 5m
- Setting the Stop-loss 5m
- Setting the Take-profit 5m
- Timeframe for Woodie’s Computation 5m
- Timeframe for Entries and Exits 5m
- Ideal Condition for Range Trading 5m
- Woodie’s Range Trading Strategy Logic 2m
- Woodie’s Range Trading Strategy 5m
- Paper/Live Trade Woodie’s Range Strategy 2m
Woodie’s Trend Trading
Woodie’s pivots not only work well during sideways phases but, can also be used to design a strategy for capturing the strong and directional price movements during trending phases. Through this section, you will learn to define the rules to efficiently build your own trend-based trading strategy using Woodie’s pivots.
- Woodie’s Trend Trading 3m 36s
- Day’s Open 5m
- Indication of a Trending Day 5m
- Long Strategy: Open Condition 5m
- Determine the Buying Level 5m
- Determine the Stop-Loss Level 5m
- Determine the Take-Profit Levels 5m
- Levels for a Downtrend 5m
- Woodie’s Trend Trading Strategy Logic 2m
- Woodie’s Trend Based Strategy 5m
- Paper/Live Trade Woodie’s Trend Strategy 2m
Camarilla Trend Trading
While Woodie’s pivots work well on longer timeframes, the Camarilla pivots on the other hand are known to perform extremely well when applied to intraday timeframes. Through this section, we will aim to create and evaluate the performance of an intraday trend-based strategy using the Camarilla pivots.
- Trend Based Strategy Using Camarilla Pivots 4m 42s
- Camarilla vs Woodie’s Pivots 5m
- Breakout Level 5m
- Timeframe: Camarilla Pivots Calculation 5m
- Timeframe: Determining Entry and Exits 5m
- Trending Condition 5m
- Camarilla Trend Trading Strategy Logic 2m
- Camarilla Trend Based Strategy 5m
- Paper/Live Trade Camarilla Strategy 2m
Fibonacci Ratios
The Fibonacci sequence of numbers is a pattern in itself that has been observed throughout many aspects of nature. By using the Fibonacci ratios derived from this very sequence of numbers, you can easily identify areas of support or resistance during a trending phase. In this section, you will learn about the significance and application of Fibonacci ratios when it comes to trading.
- Fibonacci Ratios 5m 26s
- Fibonacci Series 5m
- Significance of Fibonacci 5m
- Fibonacci in Nature 5m
- Properties of Fibonacci 5m
- Significant Fibonacci Levels 5m
- Application of Fibonacci 5m
- Breach of Fibonacci Level 5m
- Calculation of Fibonacci Ratios 5m
- Additional Reading on Fibonacci Ratios 2m
Fibonacci in Action
Knowing the applications of Fibonacci ratios when it comes to trading is important, but what’s even more important is to practically implement them on real charts. Through this section, you will learn to correctly mark and identify the Fibonacci retracement levels on real price charts.
- Fibonacci in Action 2m
- Start of a Trending Phase 5m
- Identifying Fibonacci Levels 5m
- Trading Positions 5m
- Exit the Trade 5m
Fibonacci Retracement Strategy
The prices of most assets cannot continue moving in a single direction all the time, even during the strongest of trends. In this section, you will learn to create and backtest a long-only trading strategy based on the Fibonacci retracement levels. Here, we aim to buy the asset each time the prices retrace back to a significant Fibonacci retracement zone during a strong trend.
- Fibonacci Retracement Strategy 3m 51s
- Detecting a Trend 5m
- Direction of the Trend 5m
- Significance of the Trend 5m
- Fibonacci Strategy: Buying Levels 5m
- Fibonacci Strategy: Exit Levels 5m
- Checking for a Retracement 5m
- Fibonacci Retracement Strategy 5m
- FAQs on Fibonacci Strategy 1m 42s
- Paper/Live Trade Fibonacci Retracement Strategy 2m
Short-Selling with Fibonacci Retracements
The Fibonacci retracement levels can be applied to any kind of trend, be it an uptrend or a downtrend. In this section, we will look at how you can benefit from using the Fibonacci retracement levels during a downtrend by short-selling the asset at the key retracement levels.
- Short Selling with Fibonacci 2m 45s
- Characteristic of a Downtrend 5m
- Short Strategy: Steps Involved 5m
- Short Strategy: Entry and Exit Levels 5m
- Short Strategy: Additional Conditions 5m
- Test on Pivot Points and Fibonacci Levels 14m
Capstone Project
- Getting Started 2m
- Problem Statement 2m
- Frequently Asked Questions 2m
- Capstone Solution Downloadable 2m
Run Codes Locally on Your Machine
In this section, you will learn to install the Python environment on your local machine. You will also learn about some common problems while installing python and how to troubleshoot them.
- Python Installation Overview 1m 59s
- Flow Diagram 10m
- Install Anaconda on Windows 10m
- Install Anaconda on Mac 10m
- Know your Current Environment 2m
- Troubleshooting Anaconda Installation Problems 10m
- Creating a Python Environment 10m
- Changing Environments 2m
- Quantra Environment 2m
- Troubleshooting Tips for Setting Up Environment 10m
- How to Run Files in Downloadable Section? 10m
- Troubleshooting for Running Files in Downloadable Section 10m
Summary
In this section, we will briefly summarise everything that you have learned in this course.
Summary 2m
Course Summary and Next Steps 2m
Python Codes and Data Files 2m
ABOUT THE AUTHOR
QuantInsti®
With registered users in more than 190 countries and territories, QuantInsti is the top algorithmic and quantitative trading research and teaching organization in the world. With its learning and financial applications-based ecosystem, QuantInsti, an effort by the founders of iRage, one of India’s leading HFT enterprises, has been assisting its users in growing in this field for more than ten years.
QUANTRA®: WHY?
- Get more in less time.
- Learn from professionals
- Study at your own speed.
- Obtain data and strategy models for independent practice.
REVIEWS
DANIEL MARTIN Freelance IT Consultant, Romania
Quantra is pushing the value factor higher without wasting someone’s time, by providing you with courses that have a sequence and a well defined training delivery along with practical examples that are quite close to reality. Personally, the training provided in the Quantra courses I took has been a great experience.
GERMAN MONTENEGRO Software Developer, Argentina
The courses here always have good, easy-to-understand content. The best part is that it is a mix of theory and practice, which is a great way to learn and grasp concepts, as opposed to reading books or articles.


