P
PipsGrowth

tulipy Library

Fast C-based technical analysis library with 100+ indicators. Easy to install — no external compilation dependencies like TA-Lib. Just pip install and go.

Difficulty: Beginner
Category: Indicators

Installation

# No external dependencies needed!
$ pip install tulipy
Easy Install: Unlike TA-Lib, tulipy installs with a simple pip command on all platforms — no need for pre-built wheels or compilation.

100+ Available Indicators

Overlap Studies

SMAEMADEMATEMAWMAKAMATRIMABBANDSSARVIDYA

Momentum

RSIMACDSTOCHCCIMOMROCWILLRADXDIAROON

Volume

ADADOSCOBVNVIEMV

Volatility

ATRNATRVOLATILITYSTDERR

Math

CROSSOVERCROSSANYMINMAXSUMDECAYLAGLINREG

Code Examples

Installation

Install tulipy — no C compilation needed

Python
# Simple pip install — no external dependencies like TA-Lib!
pip install tulipy
# Verify installation
python -c "import tulipy; print(tulipy.version)"

Basic Indicators

Calculate common technical indicators

Python
import tulipy as ti
import numpy as np
import yfinance as yf
# Get price data
df = yf.download("EURUSD=X", period="1y")
close = np.array(df['Close'].values, dtype=float)
# Simple Moving Average
sma_20 = ti.sma(close, period=20)
sma_50 = ti.sma(close, period=50)
# Exponential Moving Average
ema_12 = ti.ema(close, period=12)
# RSI
rsi = ti.rsi(close, period=14)
print(f"Latest SMA(20): {sma_20[-1]:.5f}")
print(f"Latest RSI: {rsi[-1]:.2f}")

MACD Indicator

Calculate MACD with signal line

Python
import tulipy as ti
import numpy as np
# MACD returns: macd, signal, histogram
macd, signal, hist = ti.macd(close,
short_period=12,
long_period=26,
signal_period=9)
print(f"MACD: {macd[-1]:.5f}")
print(f"Signal: {signal[-1]:.5f}")
print(f"Histogram: {hist[-1]:.5f}")

Bollinger Bands

Calculate Bollinger Bands for volatility analysis

Python
import tulipy as ti
# Bollinger Bands
bbands_lower, bbands_middle, bbands_upper = ti.bbands(
close, period=20, stddev=2
)
print(f"Upper: {bbands_upper[-1]:.5f}")
print(f"Middle: {bbands_middle[-1]:.5f}")
print(f"Lower: {bbands_lower[-1]:.5f}")

Multi-Indicator Strategy

Combine multiple indicators for trading signals

Python
import tulipy as ti
import numpy as np
import yfinance as yf
df = yf.download("EURUSD=X", period="1y")
close = np.array(df['Close'].values, dtype=float)
high = np.array(df['High'].values, dtype=float)
low = np.array(df['Low'].values, dtype=float)
# Calculate indicators
rsi = ti.rsi(close, period=14)
sma_fast = ti.sma(close, period=10)
sma_slow = ti.sma(close, period=30)
atr = ti.atr(high, low, close, period=14)
adx = ti.adx(high, low, close, period=14)
# Align lengths (tulipy trims NaN automatically)
min_len = min(len(rsi), len(sma_fast), len(sma_slow), len(atr), len(adx))
rsi = rsi[-min_len:]
sma_fast = sma_fast[-min_len:]
sma_slow = sma_slow[-min_len:]
atr = atr[-min_len:]
adx = adx[-min_len:]
# Generate signals
buy = (sma_fast[-1] > sma_slow[-1]) and (rsi[-1] < 70) and (adx[-1] > 25)
sell = (sma_fast[-1] < sma_slow[-1]) or (rsi[-1] > 70)
print(f"RSI: {rsi[-1]:.2f}, ADX: {adx[-1]:.2f}")
print(f"Signal: {'BUY' if buy else 'SELL' if sell else 'HOLD'}")

tulipy vs TA-Lib

FeaturetulipyTA-Lib
Installationpip install (easy)Requires C library
SpeedFast (C-based)Fast (C-based)
Indicators100+150+
Candlestick Patterns❌ No✅ 63 patterns
NaN HandlingAuto-trims outputReturns NaN prefix
DependenciesNumPy onlyC library + NumPy

Best Practices

Use NumPy Arrays

tulipy requires NumPy float64 arrays — convert pandas Series with .values

Handle Length Changes

tulipy auto-trims NaN values, so output arrays are shorter than input

No Candlestick Patterns

If you need pattern recognition, combine tulipy with TA-Lib

Align Arrays

When combining indicators, align array lengths before comparison

PipsGrowth - Expert Broker Reviews, Trading Strategies & Tools