This blog focuses on helping traders identify market trends and make more confident trading decisions using five popular technical indicators: Moving Averages, ADX, MACD, RSI, and Bollinger Bands. Each is explained with examples and accompanied by Python code snippets to help you implement them in your own strategy.
Before diving into this blog, it’s important to understand the fundamentals of technical analysis and how indicators are used in trading. Start with How to Use Technical Indicators for Trading?. This foundational blog covers the basic types of indicators, how they work, and their role in identifying trends, momentum, and potential reversals in the market.
You’re sitting at your desk, coffee in hand, staring at a price chart of your favourite stock—let’s say, Tesla. It’s been steadily climbing for weeks, bringing you a solid sense of satisfaction as your investment grows.
Suddenly, there’s a sharp dip. You freeze. Is this the beginning of the end, or just a minor correction? This uncertainty is a familiar rollercoaster ride for traders. A friend of mine faced this exact situation ; unsure of what to do, they held onto their position, watching their profits evaporate. It was a painful lesson, but it underscored the importance of understanding trends.
Now, imagine having a set of automated tools that could help you understand these price movements and make informed decisions. Sounds good, doesn’t it?
Trend-following strategies provide traders with a systematic way to ride the waves of price movement. Many seasoned traders use these techniques to stay disciplined and avoid emotional decision-making.
In this blog, we’ll explore five indicators to build trend-following strategies, complete with scenarios and practical Python snippets to get you started.
These indicators are:
- Moving Averages
- Average Directional Index
- Moving Average Convergence Divergence
- Relative Strength Index
- Bollinger Bands
Moving Averages
Moving averages (MA) are among the simplest but effective trend-following tools. They smooth out price data which can help you identify the general direction of the market. There are many types of moving averages. We have an entire blog dedicated to moving averages if you wish to explore this indicator in more detail. Here are two commonly used moving averages:
- Simple Moving Average (SMA): Takes the average of prices over a specific period.
- Exponential Moving Average (EMA): Places more weight on recent prices, making it more responsive.
Let’s say you’re monitoring Tesla’s price movements. The stock has been on a steady uptrend, but you’re unsure if the momentum will continue or reverse. By calculating the SMA or EMA, you can smooth out the noise and identify the prevailing trend.

One interpretation of the above plot can be that the close price of Tesla is above its 50-day SMA and 50-day EMA indicating a potential bullish trend.
Read a detailed blog on Moving Average Trading Strategies, this blog will cover Triple Crossover, Ribbon, and Convergence Divergence Strategies.
Average Directional Index
The Average Directional Index or ADX indicator can be used to measure the strength of a trend. For instance, if Tesla’s stock is surging and you’re wondering whether the trend is strong enough to warrant holding onto your position, ADX can provide clarity. It ranges from 0 to 100, with values above 25 indicating a strong trend.

Read the blog on the Mathematical Intuition of the ADX Indicator, this blog will cover, ADX indicator and its uses including the calculation and trading strategy using Python.
Moving Average Convergence Divergence
Moving Average Convergence Divergence or MACD combines two EMAs to identify momentum and potential entry/exit points. Let’s say you’ve noticed Tesla’s price moving sideways and want to predict the next big move. The MACD can help by revealing shifts in momentum. The MACD line crossing above the signal line indicates potential bullish momentum, while a crossover below suggests a potential bearish move.

If you want to learn more about Moving Average Convergence Divergence, you can read the blog on Divergence in Trading. This blog covers the concept of divergence, explores its definition and various types. We'll also shed light on the crucial role played by indicators and oscillators in divergence trading.
Relative Strength Index
While primarily a momentum indicator, Relative Strength Indicator or RSI can also help confirm trends. For instance, if Tesla’s RSI is above 70, it might be overbought, suggesting a potential reversal.

Check the blog on RSI Indicator, This blog talks about RSI Calculation, Strategies based on RSI Indicator and the limitations of the indicator as well.
Bollinger Bands
Bollinger Bands consist of a moving average and two standard deviation lines above and below it. They help visualize price volatility and potential breakouts. Imagine you’re waiting for Tesla’s price to break out from a range. Bollinger Bands can show when volatility is increasing.

To learn more, you can check this blog on Bollinger Bands, This blog covers formula and calculations, trading strategies in python, common mistake and even the limitations of Bollinger Bands.
Here is the Python code to calculate and visualise the indicators we discussed in this blog:
Conclusion
Trading is never a straight line—it’s full of unexpected twists and turns. One moment, everything looks great, and the next, you’re questioning all your decisions. That’s just how the market works. But instead of relying on gut feelings, having a structured approach can help you better.
Trend-following indicators like Moving Averages, ADX, MACD, RSI, and Bollinger Bands give you a way to make sense of price movements. They won’t predict the future (if only it were that easy!), but they can help you spot trends, manage risks, and avoid emotional decision-making.
In addition to trend based strategies, there are other techniques involved in price action trading.
Of course, no single indicator is perfect. The trick is to experiment, backtest, and see what works best for your style. Try layering different indicators, tweak your parameters, and always keep learning. The more you refine your approach, the better you’ll get at identifying high-probability trades.
So, fire up your Python notebook, test these strategies, and start making more data-driven decisions. The market will always be unpredictable—but at least now, you’ve got a solid playbook to work with.
Continue Learning
If you are interested in using python for technical analysis, to bring a more quant approach to your trading, we recommend a learning track offered on Quantra on Technical Analysis Using Quantitative Methods.

Python programming, automate price action patterns, trade with candlestick formations like engulfing and hammer patterns, and use 15+ technical indicators to generate signals. You'll also explore econometric models, backtesting strategies, and swing trading techniques.
For a comprehensive dive into algorithmic trading and machine learning, check out the Executive Programme in Algorithmic Trading (EPAT). Taught by industry experts, EPAT covers algo trading, quantitative finance, and machine learning with hands-on projects. Explore EPAT.
See real-world applications through EPAT student projects like Predicting Stock Trends Using Random Forests and Trading with Low ADX & Momentum Indicators.
Whether you're starting with technical analysis or advancing into algorithmic trading, these programs offer a structured, hands-on approach to help you grow.
File in the download:
Five technical indicators – Python notebook
Note: The original post has been revamped on 3rd Apr 2025 for recentness, and accuracy.
Disclaimer: All investments and trading in the stock market involve risk. Any decision to place trades in the financial markets, including trading in stock or options or other financial instruments is a personal decision that should only be made after thorough research, including a personal risk and financial assessment and the engagement of professional assistance to the extent you believe necessary. The trading strategies or related information mentioned in this article is for informational purposes only.