What are the Popular Technical Indicators Used in Algo Trading?
![undefined](https://marketfeed.gumlet.io/wp-content/uploads/2024/07/25th-may-2095.png?w=730)
There is a famous quote by John J Murphy, a leading financial analyst from the US: "Technical analysis is a skill that improves with experience and study. Always be a student, and keep learning." Today, let’s dive into the world of technical indicators and understand their role in a trader's journey. This in-depth article explores popular technical indicators used in algo trading strategies!
What is Technical Analysis?
Before learning about technical indicators, let’s first dive into the basics of technical analysis. It’s essentially the practice of using historical price and volume data to form analysis and forecast the direction or trend of stock prices (or any other financial security/asset), which can ultimately be used to make trading decisions.
Technical analysis can be seen as the study of collective investor psychology or sentiment, closely related to behavioural finance. We humans (and maybe automated trading systems) determine prices in the stock market. The price is set at the equilibrium (a state of balance) between supply and demand at any given moment.
What are Technical Indicators?
Technical indicators are mathematical tools or calculations derived from a financial asset's (stock, index, etc.) historical price and volume data. It is used to predict market trends or volatility. These are more advanced than price action methods as they use mathematical calculations to predict a stock's future movement.
Technical indicators can be primarily classified into four types:
- Volume
- Trend
- Momentum
- Volatility
Want to learn more? Click here to explore our dedicated article on technical indicators!
Why do we Need Technical Indicators in Algo Trading?
Algo trading executes orders in the financial markets (stocks, currencies, commodities, derivatives, etc.) using automated or pre-programmed trading instructions. The 'algorithm' places orders based on specific rules and criteria. These criteria include price, timing, and quantity instructions. You can incorporate technical analysis and indicators into your algorithms. They offer an objective and rule-based approach to trading. Algo traders can implement such methods to manage risk before executing buy or sell orders.
You can train your algorithm to analyse data and generate signals based on asset price movements. [Typically, there are three main types of trends: uptrend, downtrend, and sideways.] These analyses show the historical behaviour of an asset and its major fluctuations. This makes processing pattern identification and trend recognition easier for the algorithms.
Traders can easily implement technical indicators using various programming languages and algo trading platforms. Most of these indicators are versatile and applicable across different markets, making them valuable for diversified algo trading strategies.
Popular Technical Indicators Used in Algo Trading
Let's look at some popular trader's choice of trend indicators:
1. Moving Averages
A moving average is the average of the closing prices of a security/asset (index, stock, F&O, etc.) over a specified period. It is an indicator that helps traders determine the trend in the market and identify key levels of support and resistance.
- There are primarily two types of moving averages: Simple Moving Averages (SMA) and Exponential Moving Averages (EMA).
- The SMA is calculated as the mathematical average of prices over a certain period, while the EMA gives higher weightage to recent prices.
- If the price is above the moving average, it’s an uptrend. If the price is below the moving average, it’s a downtrend. You can also combine and use two or more moving averages.
The chart displays a 20-period moving average based on the closing prices of the last twenty 5-minute candles. If you switch to a daily timeframe, the average will be calculated using the closing prices of the previous twenty one-day candles.
- Bonus: Traders can use two major signals in their algo: Golden Cross and the Death Cross. Golden cross is a buy signal that is executed when the 50-day SMA crosses above the 200-day SMA. Death cross is a sell signal executed when the 50-day SMA goes below the 200-day SMA.
Here’s an Example!
Let us assume that you want to trade in ‘Reliance’ stock. You can define your algorithm rules to execute buy orders when a Golden Cross occurs and execute sell orders when a Death Cross occurs.
2. Supertrend
A supertrend is a simple line used to indicate the market trend. This is one of the most used trend-following indicators in algo trading. It can also act as support or resistance.
- The line changes its colour between green and red based on the price moment in the underlying security.
- If the price is below the Supertrend line (in red), it indicates bearishness or a downtrend. On the other hand, if the price is above the Supertrend (in green), it indicates bullishness or up-trend.
- Supertrend will tell you to initiate a position or give you the confidence to stay in the trade till the trend sustains.
- You can use TradingView to apply Supertrend or any such indicator.
When observing the above chart of Bank Nifty, we can see that the Supertrend line is green when the price is above the line and red when the price is below the line. It also recommends when to buy and sell.
Here’s an Example!
Suppose you want to trade in ‘Tata Power’ stock. You can code your trading algorithm using this indicator in such a way that it executes buy signals when the price is above the Supertrend line and generates sell signals if the price is below the Supertrend line.
3. Average Directional Index (ADX)
Traders use the ADX indicator to identify the strength of a trend, making it a valuable tool for avoiding sideways markets and improving trading decisions. During analysis, we can adjust the indicator settings based on time frames and market conditions to maximise its full potential.
Generally, traders use ADX with Directional Indicator (DI) lines for better results. This consists of three parts:
- ADX line: This measures the strength of the trend and it ranges from 0 to 100. The higher the value, the stronger the trend.
- Positive DI (+DI): This is an upward directional line that measures the strength of the upward trend.
- Negative DI (-DI): It is a downward directional line that measures the strength of the downtrend.
What are ADX Values?
ADX values help to predict trend strength:
- Traders use directional lines to predict the upward or downward trend. When the +DI line is above the -DI line, the asset is experiencing an upward trend and vice versa.
- While ADX is effective in avoiding sideways markets, traders need to be aware of the potential drawbacks such as missed price moves during transitioning phases.
- Combining ADX with other indicators like RSI and MACD will give better results and ensure risk management for traders. This will help them confirm trends and avoid false signals.
- Consider an example of HDFC stock with ADX and DI lines:
Here’s an Example!
If you wish to trade Wipro stock. You can include this indicator with DI lines and train your algorithm to generate a buy signal when the +DI line crosses above the -DI line and ADX suggests a strong trend. It should execute a sell order when the +DI line is below the -DI line and ADX indicates a strong trend in the opposite direction.
4. Parabolic SAR:
Parabolic SAR (Stop and Reverse) is a trend strength indicator. This is also used as a trend reversal indicator. It is widely used to calculate stop-loss orders and reverse points, which helps traders identify trends and make trading decisions. It is plotted as a series of dots which help traders analyse an asset.
- This is constructed to set trailing stop-loss points. This indicator moves with the asset price and helps traders by booking profits by adjusting the stop-loss levels as the trend progresses.
- The dots play an important role in deciding the trend of the asset. If the dots remain below the asset price, the uptrend is constant and intact. On the other hand, if the dots are positioned above the asset's price, it indicates a downward trend.
- Parabolic SAR and Acceleration Factor (AF) are directly proportional to the sensitivity to price changes. The higher the AF, the indicator is more sensitive to price changes. A lower AF reduces the sensitivity.
[Acceleration factor is the parameter used to calculate SAR, determining how SAR dots adjust to changes in trends and price changes.]
- This is also useful for figuring out potential trend reversals. This indicator gives signals for entering or exiting a trader, which will help traders manage their risks.
- Like ADX, this will also give its best performance when combined with other indicators like Moving Averages.
- Here is an example of Tata Steel stock with the Parabolic SAR dots indicating upward and downward trends.
Let’s look at an example!
Suppose you have decided to trade Infosys Ltd stock. You need to develop your algorithm such that it executes a buy order when SAR dots below the price are detected and executes sell orders when SAR dots above the price are observed.
Expand Your Knowledge
The indicators we have mentioned above are all trend-based. Now, let’s look at some of the popular indicators that are based on volume, volatility, and momentum:
📍Bollinger Bands: A volatility indicator that provides information about market volatility and predicts price movements.
📍On-balance volume (OBV): OBV is a volume indicator which uses volume flow to predict changes in stock price.
📍Relative Strength Index (RSI): A momentum indicator that identifies when an asset/security is over-bought or oversold.
Conclusion
There is absolutely no doubt that technical indicators are powerful tools that can enhance your algo trading strategies. They provide objective, data-driven insights, momentum, and a well-defined approach to decision-making. The evolving financial market offers a wide range of indicators that traders can choose from.
Technical analysis provides crucial inputs for algo trading systems, but it's also important that we don't solely rely on them. No indicator is perfect, accurate, or yields 100% results all the time. They are additional tools to reduce the probability of making losses and enhance the decision-making process of trading algorithms. Combining these indicators with other factors like fundamental analysis, market sentiment, and proper risk management in your algorithmic trading systems is essential.
Post your comment
No comments to display