OpenAlgo Technical Indicators for Beginners: 127 Indicators in One pip install
View Original ↗Learn SMA, EMA, Supertrend, RSI, MACD, ATR, Bollinger Bands, OBV and MFI in Python, with free yfinance data, tested code and clean charts. No broker account or API key needed.

I’m the creator of OpenAlgo. Over the years, the question I hear most from new traders who code is: “Where do I get indicators that are fast, correct and easy to use?”
Here is my answer. Run one command, pip install openalgo, and you get a technical analysis library with 127 indicator and helper functions. It works on its own. You do not need a broker login, an API key or a running OpenAlgo server to use it.
In this tutorial we will download two years of real NSE price data, calculate the most popular indicators, draw charts, and learn the beginner mistakes that waste weeks. Every code block here was run before I wrote about it.
What are OpenAlgo indicators?
Indicators are formulas applied to prices and volume. They turn a noisy chart into a few smooth lines that are easier to read. A moving average shows the trend. RSI shows how fast price is moving. ATR shows how much it usually moves in a day.
OpenAlgo gives you all of these through one object:
from openalgo import ta
A few facts, taken from the official docs and confirmed by running the library:
- The math runs in a compiled Rust core. The docs say there is no warm-up pause and no first-call compilation delay.
- You can pass a NumPy array, a pandas Series or a plain list.
- Pandas in gives you pandas out, with your dates (the index) kept intact.
- There are 127 names inside ta. I counted them with dir(ta), so you do not have to trust me.
For this tutorial I used Python 3.13, openalgo 2.0.5, yfinance 1.7.0, pandas 3.0.6 and matplotlib 3.11. Note that openalgo 2.0.5 needs Python 3.12 or newer.
Step 1: Install and count
pip install openalgo yfinance matplotlib pandas
That is all. Older releases needed an extra [indicators] install, but current versions do not.
Now let’s count the indicators:
from openalgo import ta
names = sorted(n for n in dir(ta) if not n.startswith("_"))
print(len(names)) # 127
print(names[:5]) # ['accelerator_oscillator', 'adl', 'adx', 'adxr', 'alligator']
The number includes the signal helpers such as crossover, which we will meet later.
Step 2: Load free data with yfinance
We will use daily prices for Reliance Industries on NSE, which Yahoo Finance calls RELIANCE.NS. Try ^NSEI for the Nifty 50 index later.
import yfinance as yf
raw = yf.download("RELIANCE.NS", period="2y", interval="1d",
auto_adjust=True, progress=False)
raw.columns = raw.columns.get_level_values(0) # flatten the two-level column names
df = raw[["Open", "High", "Low", "Close", "Volume"]].dropna()
df.columns = ["open", "high", "low", "close", "volume"]
print(df.shape) # (497, 5)
print(df.tail(2))
One small trap: newer yfinance versions return a two-level column header like ("Close", "RELIANCE.NS"). The line with get_level_values(0) keeps only the first level, so you get plain close, high and so on.
My run had 497 daily bars, from 9 October 2024 to 9 October 2026. Your numbers will differ a little, because new days keep arriving. In the full tutorial script I also added three download retries and a cached CSV fallback, so it still runs when Yahoo is slow.
Step 3: Trend indicators
Trend indicators answer one question: is price generally going up, down or sideways?
SMA (Simple Moving Average) is the plain average of the last N closes. EMA (Exponential Moving Average) is similar, but it gives more weight to recent days, so it reacts faster. Supertrend uses ATR (we meet it soon) to draw a line that sits under price in an uptrend and over price in a downtrend.
close, high, low, volume = df["close"], df["high"], df["low"], df["volume"]
df["sma_50"] = ta.sma(close, 50)
df["ema_12"] = ta.ema(close, 12)
df["ema_26"] = ta.ema(close, 26)
df["supertrend"], df["st_dir"] = ta.supertrend(high, low, close, period=10, multiplier=3.0)
print(df[["close", "sma_50", "ema_12", "ema_26"]].tail(2).round(2))
ta.supertrend returns two things: the line itself and a direction flag. In my test, -1 meant uptrend (the line is below price) and 1 meant downtrend. That matches the docs, but it is the opposite of what many people guess, so always check.

On the last bar in my data, the close was 1170.30 and the Supertrend line was at 1234.24 with direction 1. That is a downtrend by this indicator's definition. It is a description of the past, not a forecast.
Step 4: Momentum indicators
Momentum tells you how strong a move is, not just its direction.
RSI (Relative Strength Index) moves between 0 and 100. Traders often call readings above 70 overbought and below 30 oversold. Those are just labels. A strong stock can stay above 70 for weeks.
MACD is the gap between a fast EMA and a slow EMA, plus a smoothed “signal line” and a histogram of the difference.
df["rsi_14"] = ta.rsi(close, period=14)
df["macd"], df["macd_signal"], df["macd_hist"] = ta.macd(close, 12, 26, 9)
print(df[["rsi_14", "macd", "macd_signal", "macd_hist"]].tail(2).round(2))
print(df["rsi_14"].min().round(1), df["rsi_14"].max().round(1)) # 23.9 79.3
In my data, RSI ranged from 23.9 to 79.3, and the latest value was 35.42.


Step 5: Volatility indicators
Volatility tells you how much price tends to move.
ATR (Average True Range) is the average daily range in rupees, including gaps. If ATR is 22, a typical day moves about 22 rupees. Many traders use it to size stop distances.
Bollinger Bands draw a middle line (a 20-day average) with an upper and lower band set 2 standard deviations away. The bands widen when prices get jumpy and narrow when they calm down.
df["atr_14"] = ta.atr(high, low, close, period=14)
df["bb_upper"], df["bb_mid"], df["bb_lower"] = ta.bbands(close, period=20, std_dev=2.0)
print(df[["atr_14", "bb_upper", "bb_mid", "bb_lower"]].tail(2).round(2))
The bbands function takes std_dev. If you saw std= in an older tutorial, that was from the old 1.0.x releases. With 2.0.5, use std_dev.
On the last bar, ATR was 22.22, about 1.9% of the close. The bands were about 10% wide, measured against the middle line.

Step 6: Volume indicators
Price tells part of the story. Volume tells you how many shares changed hands while it happened.
OBV (On Balance Volume) is a running total. On an up day it adds that day’s volume, and on a down day it subtracts it. If OBV and price fall together, the move has volume behind it.
MFI (Money Flow Index) is like RSI, but it also uses volume. It also runs from 0 to 100.
df["obv"] = ta.obv(close, volume)
df["mfi_14"] = ta.mfi(high, low, close, volume, period=14)
print(df[["volume", "obv", "mfi_14"]].tail(2).round(2))
A note on VWAP. ta.vwap is designed for intraday bars. When I ran it on daily bars, it returned a running average over the whole series, and changing the anchor option made no difference. So for daily data, I use MFI and OBV instead.

Step 7: Signal helpers
Indicators are lines. Signals are events, such as “line A just crossed above line B”. OpenAlgo has helper functions for that. The two most common are crossover and crossunder.
Let’s mark every time the 12-day EMA crossed the 26-day EMA:
import pandas as pd
up = pd.Series(ta.crossover(df["ema_12"], df["ema_26"]), index=df.index)
down = pd.Series(ta.crossunder(df["ema_12"], df["ema_26"]), index=df.index)
print("crossovers:", int(up.sum()), "| crossunders:", int(down.sum()))
print("last 3 crossover dates:", [d.date().isoformat() for d in df.index[up][-3:]])
My run found 9 crossovers and 10 crossunders in two years. The last crossover dates were 30 April, 7 August and 7 September 2026.

Look at the very first red triangle, on 10 October 2024, right at the start of the chart. That is not a real signal. It is a warm-up artifact, which brings us to the mistakes section.
This counts past events for learning. It is not a trading recommendation.
Step 8: Pandas in, pandas out
This is the feature that saves the most time. Look at what comes back for three kinds of input:
rsi_s = ta.rsi(close, 14) # pandas Series in
rsi_n = ta.rsi(close.to_numpy(), 14) # NumPy array in
rsi_l = ta.rsi(close.tolist(), 14) # plain list in
print(type(rsi_s).__name__, type(rsi_n).__name__, type(rsi_l).__name__)
print(rsi_s.index.equals(close.index)) # True
The output is Series ndarray ndarray. A Series in gives a Series out, with the same dates. A NumPy array gives an array back. A list also gave me a NumPy array, not a list, so do not rely on getting a list back. The numbers were identical in all three runs.
Common beginner mistakes
1. Forgetting the warm-up NaNs. A 50-day average needs 50 days of history. The first 49 values are empty (NaN). In my data: SMA 50 had 49 empty values, Bollinger Bands 19, RSI 14, ATR 13, MFI 13 and Supertrend 9. Always drop or ignore them before you make decisions.
2. Trusting early EMA and MACD values. EMA, MACD and OBV had zero NaNs in my test, which looks nice. But their first values start from a seed, and they need a few dozen bars to settle. That is why the first crossunder on the chart is fake. Skip the first 50 or so rows.
3. Not wrapping helper outputs. The helpers (crossover, crossunder, highest, lowest and a few more) always return a plain NumPy array, even when you give them a Series. If you try df[result] or .iloc on them, you may get confusing errors. Wrap them first:
signal = pd.Series(ta.crossover(df["ema_12"], df["ema_26"]), index=df.index)
4. Acting on the same bar’s close. A daily signal is only known after the market closes. If your test buys at that same close, you are cheating with information you could not have had. Shift the signal by one bar so you act on the next one:
next_bar_signal = up.shift(1, fill_value=False)
5. Treating indicators as predictions. An indicator describes what already happened. RSI above 70 does not mean price must fall. Use indicators to organise your thinking, then test any idea on data you did not use to design it.
Put it together: one dashboard
Now we combine price, trend, momentum, volatility and volume in one picture. Here is a shortened version of the dashboard code:
import matplotlib.pyplot as plt
fig, (a1, a2, a3) = plt.subplots(3, 1, figsize=(16, 10), sharex=True,
gridspec_kw={"height_ratios": [3, 1, 1]})
a1.plot(df.index, close, color="black", label="Close")
a1.plot(df.index, df["ema_12"], label="EMA 12")
a1.plot(df.index, df["ema_26"], label="EMA 26")
a1.fill_between(df.index, df["bb_lower"], df["bb_upper"], alpha=0.1)
a1.legend(ncol=3)
a2.plot(df.index, df["rsi_14"])
a2.axhline(70, ls="--"); a2.axhline(30, ls="--")
a3.bar(df.index, df["macd_hist"])
fig.savefig("mini_dashboard.png", dpi=100, bbox_inches="tight")
The full tutorial folder has a make_charts.py script that draws all the charts in this article, including the full five-panel dashboard at the top.
Here is how I read that dashboard on the latest bar, in plain words. Price is below both EMAs and below the Supertrend line. RSI is in the mid-30s, MACD is below its signal line, and ATR is calm compared with its spring 2026 peak. That tells me the stock has been weak recently. It does not tell me what happens tomorrow.
What to try next
You have used about 10 of the 127 names. Here are good next steps:
- Swap RELIANCE.NS for ^NSEI, INFY.NS or HDFCBANK.NS, and rerun everything.
- Try other averages from the trend group, such as ta.hma, ta.dema or ta.kama.
- Look at ta.adx for trend strength and ta.stochastic for another momentum view.
- Explore ta.keltner, ta.donchian and ta.chandelier_exit in the volatility group.
- Read the docs for each group: Trend, Momentum, Volatility, Volume, Statistical, Hybrid and Utility.
Useful links:
If you find a bug or want a new indicator, open an issue on GitHub.
Final thoughts
Indicators are tools for seeing, not crystal balls. The goal of this tutorial was to show how little code it takes to compute them properly with OpenAlgo: one install, one import, and the same pandas workflow you already know.
Start small, check every output yourself, and keep a healthy doubt about any line on a chart, including the ones I drew here.
Educational only, not financial advice. The examples use past data and show how the library works. They are not recommendations to buy or sell anything.