Skip to content

Streamize-llc/wavealgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wavealgo

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.

Installation

pip install wavealgo

Quick Start

Session (recommended)

Bind 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) / 3

Direct API (Pine Script compatible)

import 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)

Supported Functions (62)

Overlap Studies

sma, ema, wma, vwma, swma, rma, hma, alma, linreg, bb, bbw, kc, kcw, sar, supertrend

Momentum

rsi, stoch, macd, cci, mfi, cmo, mom, roc, tsi, wpr, dmi

Volatility

atr, tr, stdev, variance

Volume

obv, vwap, pvt, accdist

Statistics

correlation, dev, median, mode, range, percentile_linear_interpolation, percentile_nearest_rank, percentrank, cog, rci

Highest/Lowest

highest, lowest, highestbars, lowestbars, valuewhen, barssince, max, min

Signals

cross, crossover, crossunder, rising, falling, change, pivothigh, pivotlow, pivot_point_levels, cum

Pine Script Engine

Run Pine Script source code directly:

result = wa.pine.run(pine_source_code, df)

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages