2022-04-20 22:10:21 -07:00
# QuanTAlib - quantitative technical indicators for Quantower and other C#-based trading platorms
[](https://sonarcloud.io/summary/overall?id=mihakralj_QuanTAlib)
[](https://app.codacy.com/gh/mihakralj/QuanTAlib/dashboard)
[](https://codecov.io/gh/mihakralj/QuanTAlib)
[](https://sonarcloud.io/summary/new_code?id=mihakralj_QuanTAlib)
[](https://www.codefactor.io/repository/github/mihakralj/quantalib/overview/main)
[](https://www.nuget.org/packages/QuanTAlib/)

[](https://www.nuget.org/packages/QuanTAlib/)
[](https://github.com/mihakralj/QuanTAlib/watchers)
2022-04-21 12:53:13 -07:00
[](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
2022-04-20 22:10:21 -07:00
Quantitative TA Library (**QuanTAlib**) is an easy-to-use C# library for quantitative technical analysis with base algorithms, charts, signals and strategies useful for trading securities with [Quantower ](https://www.quantower.com/ ) and other C#-based trading platforms.
2022-11-10 20:10:35 -08:00
**QuanTAlib** is written with some specific design criteria in mind - some reasons why there is '_yet another C# TA library_':
2022-04-20 22:10:21 -07:00
- Written in native C# - no code conversion from TA-LIB or other imported/converted TA libraries
2022-11-10 20:10:35 -08:00
- No usage of Decimal datatypes, LINQ, interface abstractions, or static classes with tons of methods (all for performance reasons)
2022-04-20 22:10:21 -07:00
- Supports both **historical data analysis** (working on bulk of historical arrays) and **real-time analysis** (adding one data item at the time without the need to re-calculate the whole history)
2022-11-10 20:10:35 -08:00
- Calculate early data right - no hiding of incomplete calculations with NaN values (unless explicitly requested with useNan: true), data is as valid as mathematically possible from the first value
- Usage of events - each data series is an event publisher, each indicator is a subscriber - this allows seamless data flow between indicators)
- Seamlessly integrates with **Polyglot notebooks** (.NET Interactive) and used in Jupyter notebooks - see the examples and documentation.
2022-04-20 22:10:21 -07:00
2022-11-10 20:10:35 -08:00
QuanTAlib does not focus on sources of OHLCV quotes. There are some basic data feeds available to use in learning and strategy exploration: `RND_Feed` and `GBM_Feed` for random data feed, `Yahoo_Feed` and `Alphavantage_Feed` for quick grab of basic daily data of US stock market.
2022-04-20 22:10:21 -07:00
2022-11-10 20:10:35 -08:00
See [Getting Started ](https://github.com/mihakralj/QuanTAlib/blob/main/Docs/getting_started.ipynb ) .NET interactive notebook to get a feel how library works. Developers can use QuanTAlib in .NET interactive or in console apps, but the best usage of the library is withing C#-enabled trading platforms - see **QuanTower_Charts** folder for Quantower examples.
2022-04-20 22:10:21 -07:00
2022-11-10 22:52:44 -08:00
## Coverage
2022-11-10 20:10:35 -08:00
⭐= Calculation is validated against other TA libraries
✔️= Calculation exists but has no cross-validation tests
⛔= Not implemented (yet)
| **BASIC TRANSFORMS** | **QuanTAlib** | **TA-LIB** | **Skender** |
|--|:--:|:--:|:--:|
2022-11-11 21:15:18 -08:00
| ✔️ OC2 - (Open+Close)/2 |️ `.OC2` || ️ GetBaseQuote |
| ⭐ HL2 - Median Price | `.HL2` | MEDPRICE | ️ GetBaseQuote |
| ⭐ HLC3 - Typical Price | `.HLC3` | TYPPRICE ||
2022-11-10 20:10:35 -08:00
| ✔️ OHL3 - (Open+High+Low)/3 | `.OHL3` |||
2022-11-11 21:15:18 -08:00
| ⭐ OHLC4 - Average Price | `.OHLC4` | AVGPRICE |️ GetBaseQuote |
| ⭐ HLCC4 - Weighted Price | `.HLCC4` | WCLPRICE ||
| ⭐ MAX - Max value | `MAX_Series` | MAX ||
| ⭐ MIN - Min value | `MIN_Series` | MIN ||
| ⛔ MID - Midpoint value || MIDPOINT ||
| ⛔ MIDP - Midpoint price || MIDPRICE ||
| ⛔ SUM - Summation || SUM ||
| ⭐ ADD - Addition | `ADD_Series` | ADD ||
| ⭐ SUB - Subtraction | `SUB_Series` | SUB ||
| ⭐ MUL - Multiplication | `MUL_Series` | MUL ||
| ⭐ DIV - Division | `DIV_Series` | DIV ||
2022-11-10 20:10:35 -08:00
|||||
| **STATISTICS & NUMERICAL ANALYSIS** | **QuanTAlib** | **TA-LIB** | **Skender** |
2022-11-11 21:15:18 -08:00
| ✔️ BIAS - Bias | `BIAS_Series` |||
2022-11-10 20:10:35 -08:00
| ⛔ CORREL - Pearson's Correlation Coefficient || CORREL | GetCorrelation |
| ⛔ COVAR - Covariance ||| GetCorrelation |
2022-11-11 21:15:18 -08:00
| ✔️ ENTP - Entropy | `ENTP_Series` |||
| ✔️ KURT - Kurtosis | `KURT_Series` |||
| ⭐ LINREG - Linear Regression | `LINREG_Series` || GetSlope |
| ⭐ MAD - Mean Absolute Deviation | `MAD_Series` || GetSma |
| ⭐ MAPE - Mean Absolute Percent Error | `MAPE_Series` || GetSma |
| ✔️ MED - Median value | `MED_Series` |||
| ✔️ MSE - Mean Squared Error | `MSE_Series` || GetSma |
2022-11-10 20:10:35 -08:00
| ⛔ SKEW - Skewness ||||
2022-11-11 21:15:18 -08:00
| ⭐ SDEV - Standard Deviation (Volatility) | `SDEV_Series` | STDDEV ||
| ✔️ SSDEV - Sample Standard Deviation | `SSDEV_Series` |||
| ✔️ SMAPE - Symmetric Mean Absolute Percent Error | `SMAPE_Series` |||
| ✔️ VAR - Population Variance | `VAR_Series` | VAR ||
| ✔️ SVAR - Sample Variance | `SVAR_Series` |||
2022-11-10 20:10:35 -08:00
| ⛔ QUANT - Quantile ||||
2022-11-11 21:15:18 -08:00
| ✔️ WMAPE - Weighted Mean Absolute Percent Error | `WMAPE_Series` |||
2022-11-10 20:10:35 -08:00
| ⛔ ZSCORE - Number of standard deviations from mean ||||
|||||
| **TREND INDICATORS & AVERAGES** | **QuanTAlib** | **TA-LIB** | **Skender** |
| ⛔ AFIRMA - Autoregressive Finite Impulse Response Moving Average ||||
2022-11-11 21:15:18 -08:00
| ⭐ ALMA - Arnaud Legoux Moving Average | `ALMA_Series` || GetAlma |
2022-11-10 20:10:35 -08:00
| ⛔ ARIMA - Autoregressive Integrated Moving Average ||||
2022-11-11 21:15:18 -08:00
| ⭐ DEMA - Double EMA Average | `DEMA_Series` | DEMA | GetDema |
| ⭐ EMA - Exponential Moving Average | `EMA_Series` || GetEma |
2022-11-10 20:10:35 -08:00
| ⛔ EPMA - Endpoint Moving Average ||| GetEpma |
2022-11-11 09:51:57 -08:00
| ⛔ FRAMA - Fractal Adaptive Moving Average ||||
2022-11-10 20:10:35 -08:00
| ⛔ FWMA - Fibonacci's Weighted Moving Average ||||
2022-11-11 09:51:57 -08:00
| ⛔ HILO - Gann High-Low Activator ||||
2022-11-11 21:15:18 -08:00
| ✔️ HEMA - Hull/EMA Average | `HEMA_Series` |||
2022-11-10 20:10:35 -08:00
| ⛔ Hilbert Transform Instantaneous Trendline || HT_TRENDLINE | GetHtTrendline |
2022-11-11 21:15:18 -08:00
| ⭐ HMA - Hull Moving Average | `HMA_Series` || GetHma |
2022-11-10 20:10:35 -08:00
| ⛔ HWMA - Holt-Winter Moving Average ||||
2022-11-11 21:15:18 -08:00
| ✔️ JMA - Jurik Moving Average | `JMA_Series` |||
| ⭐ KAMA - Kaufman's Adaptive Moving Average | `KAMA_Series` | KAMA | GetKama |
2022-11-11 09:51:57 -08:00
| ⛔ KDJ - KDJ Indicator (trend reversal) ||||
2022-11-10 20:10:35 -08:00
| ⛔ LSMA - Least Squares Moving Average ||||
2022-11-11 21:15:18 -08:00
| ⭐ MACD - Moving Average Convergence/Divergence | `MACD_Series` | MACD | GetMacd |
2022-11-10 20:10:35 -08:00
| ⛔ MAMA - MESA Adaptive Moving Average || MAMA | GetMama |
2022-11-11 09:51:57 -08:00
| ⛔ MCGD - McGinley Dynamic ||||
2022-11-10 20:10:35 -08:00
| ⛔ MMA - Modified Moving Average ||||
| ⛔ PPMA - Pivot Point Moving Average ||||
| ⛔ PWMA - Pascal's Weighted Moving Average ||||
2022-11-11 21:15:18 -08:00
| ✔️ RMA - WildeR's Moving Average | `RMA_Series` |||
2022-11-10 20:10:35 -08:00
| ⛔ SINWMA - Sine Weighted Moving Average ||||
2022-11-11 21:15:18 -08:00
| ⭐ SMA - Simple Moving Average | `SMA_Series` | SMA | GetSma |
| ⭐ SMMA - Smoothed Moving Average | `SMMA_Series` |||
2022-11-10 20:10:35 -08:00
| ⛔ SSF - Ehler's Super Smoother Filter ||||
| ⛔ SUP - Supertrend ||||
| ⛔ SWMA - Symmetric Weighted Moving Average ||||
2022-11-11 09:51:57 -08:00
| ⛔ T3 - Tillson T3 Moving Average || T3 | GetT3 |
2022-11-11 21:15:18 -08:00
| ⭐ TEMA - Triple EMA Average | `TEMA_Series` | TEMA | GetTema |
| ⭐ TRIMA - Triangular Moving Average | `TRIMA_Series` | TRIMA ||
2022-11-11 09:51:57 -08:00
| ⛔ TSF - Time Series Forecast || TSF ||
2022-11-10 20:10:35 -08:00
| ⛔ VIDYA - Variable Index Dynamic Average ||||
2022-11-11 09:51:57 -08:00
| ⛔ VOR - Vortex Indicator ||||
2022-11-11 21:15:18 -08:00
| ⭐ WMA - Weighted Moving Average | `WMA_Series` | WMA | GetWma |
| ✔️ ZLEMA - Zero Lag EMA Average | `ZLEMA_Series` |||
2022-11-10 20:10:35 -08:00
|||||
| **VOLATILITY INDICATORS** | **QuanTAlib** | **TA-LIB** | **Skender** |
2022-11-11 21:15:18 -08:00
| ⭐ ADL - Chaikin Accumulation Distribution Line | `ADL_Series` | AD | GetAdl |
| ⭐ ADOSC - Chaikin Accumulation Distribution Oscillator | `ADOSC_Series` | ADOSC| GetAdl |
| ⭐ ATR - Average True Range | `ATR_Series` | ATR | GetAtr |
| ⭐ ATRP - Average True Range Percent | `ATRP_Series` || GetAtr |
2022-11-11 09:51:57 -08:00
| ⛔ BETA - Beta coefficient || BETA | GetBeta |
2022-11-11 21:15:18 -08:00
| ⭐ BBANDS - Bollinger Bands® | `BBANDS_Series` | BBANDS | GetBollingerBands |
2022-11-11 09:51:57 -08:00
| ⛔ CHAND - Chandelier Exit ||| GetChandelier |
2022-11-10 20:10:35 -08:00
| ⛔ CRSI - Connor RSI ||| GetConnorsRsi |
| ⛔ DON - Donchian Channels ||| GetDonchian |
| ⛔ FCB - Fractal Chaos Bands ||| GetFcb |
| ⛔ HV - Historical Volatility ||||
| ⛔ ICH - Ichimoku ||| GetIchimoku |
| ⛔ KEL - Keltner Channels ||| GetKeltner |
| ⛔ NATR - Normalized Average True Range || NATR | GetAtr |
2022-11-11 09:51:57 -08:00
| ⛔ CHN - Price Channel Indicator ||||
2022-11-11 21:15:18 -08:00
| ⭐ RSI - Relative Strength Index | `RSI_Series` | RSI | GetRsi |
2022-11-10 20:10:35 -08:00
| ⛔ SAR - Parabolic Stop and Reverse || SAR | GetParabolicSar |
2022-11-11 09:51:57 -08:00
| ⛔ SRSI - Stochastic RSI || STOCHRSI | GetStochRsi |
2022-11-10 20:10:35 -08:00
| ⛔ STARC - Starc Bands ||||
2022-11-11 21:15:18 -08:00
| ⭐ TR - True Range | `TR_Series` | TRANGE | GetTr |
2022-11-10 20:10:35 -08:00
| ⛔ UI - Ulcer Index ||||
| ⛔ VSTOP - Volatility Stop ||||
|||||
| **MOMENTUM INDICATORS & OSCILLATORS** | **QuanTAlib** | **TA-LIB** | **Skender** |
| ⛔ AC - Acceleration Oscillator ||||
| ⛔ ADX - Average Directional Movement Index || ADX | GetAdx |
| ⛔ ADXR - Average Directional Movement Index Rating || ADXR | GetAdx |
| ⛔ AO - Awesome Oscillator ||| GetAwesome |
| ⛔ APO - Absolute Price Oscillator || APO ||
| ⛔ AROON - Aroon oscillator || AROON | GetAroon |
| ⛔ BOP - Balance of Power || BOP | GetBop |
2022-11-11 21:15:18 -08:00
| ⭐ CCI - Commodity Channel Index | `CCI_Series` | CCI | GetCci |
2022-11-10 20:10:35 -08:00
| ⛔ CFO - Chande Forcast Oscillator ||||
| ⛔ CMO - Chande Momentum Oscillator || CMO | GetCmo |
| ⛔ COG - Center of Gravity ||||
2022-11-11 09:51:57 -08:00
| ⛔ COPPOCK - Coppock Curve ||||
2022-11-10 20:10:35 -08:00
| ⛔ CTI - Ehler's Correlation Trend Indicator ||||
| ⛔ DPO - Detrended Price Oscillator ||| GetDpo |
| ⛔ DMI - Directional Movement Index || DX | GetAdx |
| ⛔ EFI - Elder Ray's Force Index ||| GetElderRay |
| ⛔ GAT - Alligator oscillator ||| GetGator |
| ⛔ HURST - Hurst Exponent ||| GetHurst |
| ⛔ KRI - Kairi Relative Index ||||
| ⛔ KVO - Klinger Volume Oscillator ||||
| ⛔ MFI - Money Flow Index || MFI | GetMfi |
2022-11-11 09:51:57 -08:00
| ⛔ MOM - Momentum || MOM ||
2022-11-10 20:10:35 -08:00
| ⛔ NVI - Negative Volume Index ||||
| ⛔ PO - Price Oscillator ||||
| ⛔ PPO - Percentage Price Oscillator || PPO ||
| ⛔ PMO - Price Momentum Oscillator ||||
| ⛔ PVI - Positive Volume Index ||||
2022-11-11 09:51:57 -08:00
| ⛔ ROC - Rate of Change || MOM | GetRoc |
2022-11-10 20:10:35 -08:00
| ⛔ RVGI - Relative Vigor Index ||||
| ⛔ SMI - Stochastic Momentum Index ||||
2022-11-11 09:51:57 -08:00
| ⛔ STC - Schaff Trend Cycle ||||
| ⛔ STOCH - Stochastic Oscillator || STOCH | GetStoch |
| ⛔ TRIX - 1-day ROC of TEMA || TRIX | GetTrix |
2022-11-10 20:10:35 -08:00
| ⛔ TSI - True Strength Index ||||
2022-11-11 09:51:57 -08:00
| ⛔ UO - Ultimate Oscillator || ULTOSC | GetUltimate |
| ⛔ WILLR - Larry Williams' %R || WILLR | GetWilliamsR |
2022-11-10 20:10:35 -08:00
| ⛔ WGAT - Williams Alligator ||||
|||||
| **VOLUME INDICATORS** | **QuanTAlib** | **TA-LIB** | **Skender** |
| ⛔ AOBV - Archer On-Balance Volume ||||
2022-11-11 09:51:57 -08:00
| ⛔ CMF - Chaikin Money Flow ||||
| ⛔ EOM - Ease of Movement ||||
2022-11-11 21:15:18 -08:00
| ⭐ OBV - On-Balance Volume | `OBV_Series` | OBV | GetObv |
2022-11-10 20:10:35 -08:00
| ⛔ PRS - Price Relative Strength |||
| ⛔ PVOL - Price-Volume ||||
| ⛔ PVO - Percentage Volume Oscillator ||||
| ⛔ PVR - Price Volume Rank ||||
| ⛔ PVT - Price Volume Trend ||||
| ⛔ VP - Volume Profile ||||
| ⛔ VWAP - Volume Weighted Average Price ||||
| ⛔ VWMA - Volume Weighted Moving Average ||||