Pine Script compatible technical analysis library for Python with a wavealgo-native API.
Two ways to use: direct ta.* calls (Pine Script compatible) or Session for cleaner OHLCV workflows.
pip install wavealgoBind OHLCV data once, skip repetitive column passing:
import wavealgo as wa
s = wa.Session(df)
# OHLCV auto-injected from session
atr = s.ta.atr(14) # high/low/close injected
st_val, st_dir = s.ta.supertrend(3.0, 10)
# Source is explicit — use close, hl2, hlc3, etc.
sma = s.ta.sma(s.close, 20)
rsi = s.ta.rsi(s.close, 14)
bb = s.ta.bb(s.close, 20, 2.0)
bb.middle, bb.upper, bb.lower # named access
# Derived series
typical = s.hlc3 # (high + low + close) / 3import wavealgo as wa
# Pine Script: sma20 = ta.sma(close, 20)
sma20 = wa.ta.sma(df['close'], 20)
# Pine Script: [middle, upper, lower] = ta.bb(close, 20, 2)
middle, upper, lower = wa.ta.bb(df['close'], 20, 2) # tuple unpacking still works
# Named access also works
result = wa.ta.bb(df['close'], 20, 2)
result.middle, result.upper, result.lower
# Pine Script: [macdLine, signal, hist] = ta.macd(close, 12, 26, 9)
macd_line, signal, hist = wa.ta.macd(df['close'], 12, 26, 9)sma, ema, wma, vwma, swma, rma, hma, alma, linreg, bb, bbw, kc, kcw, sar, supertrend
rsi, stoch, macd, cci, mfi, cmo, mom, roc, tsi, wpr, dmi
atr, tr, stdev, variance
obv, vwap, pvt, accdist
correlation, dev, median, mode, range, percentile_linear_interpolation, percentile_nearest_rank, percentrank, cog, rci
highest, lowest, highestbars, lowestbars, valuewhen, barssince, max, min
cross, crossover, crossunder, rising, falling, change, pivothigh, pivotlow, pivot_point_levels, cum
Run Pine Script source code directly:
result = wa.pine.run(pine_source_code, df)MIT