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
- 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)
2022-11-26 22:04:26 -08:00
| **BASIC TRANSFORMS** | **QuanTAlib** | **TA-LIB** | **Skender** | **Pandas TA** | **Tulip** |
|--|:--:|:--:|:--:|:--:|:--:|
2022-11-14 11:06:00 -08:00
| ⭐ OC2 - (Open+Close)/2 |️ `.OC2` || CandlePart.OC2 ||
2022-11-15 16:22:07 -08:00
| ⭐ HL2 - Median Price | `.HL2` | MEDPRICE | CandlePart.HL2 | hl2 |
| ⭐ HLC3 - Typical Price | `.HLC3` | TYPPRICE | CandlePart.HLC3 | hlc3 |
2022-11-14 11:06:00 -08:00
| ⭐ OHL3 - (Open+High+Low)/3 | `.OHL3` || CandlePart.OHL3 ||
2022-11-26 22:04:26 -08:00
| ⭐ OHLC4 - Average Price | `.OHLC4` | AVGPRICE |️ CandlePart.OHLC4 | ohlc4 | avgprice |
2022-11-14 11:06:00 -08:00
| ⭐ HLCC4 - Weighted Price | `.HLCC4` | WCLPRICE | CandlePart.HLCC4 ||
2022-11-15 16:22:07 -08:00
| ⭐ MIDPOINT - Midpoint value | `MIDPOINT_Series` | MIDPOINT || midpoint |
| ⭐ MIDPRICE - Midpoint price | `MIDPRICE_Series` | MIDPRICE || midprice |
2022-11-26 22:04:26 -08:00
| ⭐ MAX - Max value | `MAX_Series` | MAX ||| max |
| ⭐ MIN - Min value | `MIN_Series` | MIN ||| min |
| ⭐ SUM - Summation | `SUM_Series` | SUM ||| sum |
| ⭐ ADD - Addition | `ADD_Series` | ADD ||| add |
| ⭐ SUB - Subtraction | `SUB_Series` | SUB ||| sub |
| ⭐ MUL - Multiplication | `MUL_Series` | MUL ||| mul |
| ⭐ DIV - Division | `DIV_Series` | DIV ||| div |
2022-11-10 20:10:35 -08:00
|||||
2022-11-26 22:04:26 -08:00
| **STATISTICS & NUMERICAL ANALYSIS** |
||||||
2022-11-14 11:06:00 -08:00
| ⭐ BIAS - Bias | `BIAS_Series` ||| bias |
2022-11-15 21:12:03 -08:00
| ⭐ CORR - Pearson's Correlation Coefficient | `CORR_Series` | CORREL | GetCorrelation ||
2022-11-17 07:53:45 -08:00
| ⭐ COVAR - Covariance | `COVAR_Series` || GetCorrelation ||
2022-11-26 22:04:26 -08:00
| ⛔ DECAY - Linear Decay ||||| decay |
| ⛔ EDECAY - Exponential Decay ||||| edecay |
2022-11-17 07:53:45 -08:00
| ⭐ ENTROPY - Entropy | `ENTROPY_Series` ||| entropy |
| ⭐ KURTOSIS - Kurtosis | `KURT_Series` ||| kurtosis |
2022-11-14 11:06:00 -08:00
| ⭐ LINREG - Linear Regression | `LINREG_Series` || GetSlope ||
| ⭐ MAD - Mean Absolute Deviation | `MAD_Series` || GetSma | mad |
| ⭐ MAPE - Mean Absolute Percent Error | `MAPE_Series` || GetSma ||
| ⭐ MED - Median value | `MED_Series` ||| median |
2022-11-15 16:22:07 -08:00
| ⭐ MSE - Mean Squared Error | `MSE_Series` || GetSma ||
| ⛔ SKEW - Skewness |||| skew |
| ⭐ SDEV - Standard Deviation (Volatility) | `SDEV_Series` | STDDEV | GetStdDev | stdev |
| ⭐ SSDEV - Sample Standard Deviation | `SSDEV_Series` ||| stdev |
2022-11-14 11:06:00 -08:00
| ✔️ SMAPE - Symmetric Mean Absolute Percent Error | `SMAPE_Series` ||||
| ⭐ VAR - Population Variance | `VAR_Series` | VAR || variance |
| ⭐ SVAR - Sample Variance | `SVAR_Series` ||| variance |
2022-11-15 16:22:07 -08:00
| ⛔ QUANTILE - Quantile |||| quantile |
2022-11-14 11:06:00 -08:00
| ✔️ WMAPE - Weighted Mean Absolute Percent Error | `WMAPE_Series` ||||
2022-11-15 21:12:03 -08:00
| ⭐ ZSCORE - Number of standard deviations from mean | `ZSCORE_Series` || GetStdDev | zscore |
2022-11-14 11:06:00 -08:00
||||||
2022-11-26 22:04:26 -08:00
| **TREND INDICATORS & AVERAGES** |
||||||
2022-11-14 11:06:00 -08:00
| ⛔ AFIRMA - Autoregressive Finite Impulse Response Moving Average |||||
2022-11-15 16:22:07 -08:00
| ⭐ ALMA - Arnaud Legoux Moving Average | `ALMA_Series` || GetAlma | alma |
2022-11-14 11:06:00 -08:00
| ⛔ ARIMA - Autoregressive Integrated Moving Average |||||
2022-11-26 22:04:26 -08:00
| ⭐ DEMA - Double EMA Average | `DEMA_Series` | DEMA | GetDema | dema | dema |
| ⭐ EMA - Exponential Moving Average | `EMA_Series` | EMA | GetEma | ema | ema |
2022-11-14 11:06:00 -08:00
| ⛔ EPMA - Endpoint Moving Average ||| GetEpma ||
| ⛔ FRAMA - Fractal Adaptive Moving Average |||||
2022-11-15 16:22:07 -08:00
| ⛔ FWMA - Fibonacci's Weighted Moving Average |||| fwma |
| ⛔ HILO - Gann High-Low Activator |||| hilo |
2022-11-14 11:06:00 -08:00
| ✔️ HEMA - Hull/EMA Average | `HEMA_Series` ||||
| ⛔ Hilbert Transform Instantaneous Trendline || HT_TRENDLINE | GetHtTrendline ||
2022-11-26 22:04:26 -08:00
| ⭐ HMA - Hull Moving Average | `HMA_Series` || GetHma | hma | hma |
2022-11-15 16:22:07 -08:00
| ⛔ HWMA - Holt-Winter Moving Average |||| hwma |
| ✔️ JMA - Jurik Moving Average | `JMA_Series` ||| jma |
2022-11-26 22:04:26 -08:00
| ⭐ KAMA - Kaufman's Adaptive Moving Average | `KAMA_Series` | KAMA | GetKama | kama | kama |
2022-11-15 16:22:07 -08:00
| ⛔ KDJ - KDJ Indicator (trend reversal) |||| kdj |
2022-11-14 11:06:00 -08:00
| ⛔ LSMA - Least Squares Moving Average |||||
2022-11-15 16:22:07 -08:00
| ⭐ MACD - Moving Average Convergence/Divergence | `MACD_Series` | MACD | GetMacd | macd |
2022-11-18 21:05:14 -08:00
| ⭐ MAMA - MESA Adaptive Moving Average | `MAMA_Series` | MAMA | GetMama ||
2022-11-15 16:22:07 -08:00
| ⛔ MCGD - McGinley Dynamic |||| mcgd |
2022-11-14 11:06:00 -08:00
| ⛔ MMA - Modified Moving Average |||||
| ⛔ PPMA - Pivot Point Moving Average |||||
2022-11-15 16:22:07 -08:00
| ⛔ PWMA - Pascal's Weighted Moving Average |||| pwma |
2022-11-14 11:06:00 -08:00
| ⭐ RMA - WildeR's Moving Average | `RMA_Series` ||| rma |
2022-11-15 16:22:07 -08:00
| ⛔ SINWMA - Sine Weighted Moving Average |||| sinwma |
2022-11-14 11:06:00 -08:00
| ⭐ SMA - Simple Moving Average | `SMA_Series` | SMA | GetSma | sma |
| ⭐ SMMA - Smoothed Moving Average | `SMMA_Series` || GetSmma ||
2022-11-15 16:22:07 -08:00
| ⛔ SSF - Ehler's Super Smoother Filter |||| ssf |
| ⛔ SUPERTREND - Supertrend |||| supertrend |
| ⛔ SWMA - Symmetric Weighted Moving Average |||| swma |
2022-11-18 21:05:14 -08:00
| ⭐ T3 - Tillson T3 Moving Average | `T3_Series` | T3 | GetT3 | t3 |
2022-11-14 11:06:00 -08:00
| ⭐ TEMA - Triple EMA Average | `TEMA_Series` | TEMA | GetTema | tema |
2022-11-15 16:22:07 -08:00
| ⭐ TRIMA - Triangular Moving Average | `TRIMA_Series` | TRIMA || trima |
2022-11-14 11:06:00 -08:00
| ⛔ TSF - Time Series Forecast || TSF |||
2022-11-15 16:22:07 -08:00
| ⛔ VIDYA - Variable Index Dynamic Average |||| vidya |
| ⛔ VORTEX - Vortex Indicator |||| vortex |
2022-11-14 11:06:00 -08:00
| ⭐ WMA - Weighted Moving Average | `WMA_Series` | WMA | GetWma | wma |
| ⭐ ZLEMA - Zero Lag EMA Average | `ZLEMA_Series` ||| zlma |
||||||
2022-11-26 22:04:26 -08:00
| **VOLATILITY INDICATORS** |
||||||
| ⭐ ADL - Chaikin Accumulation Distribution Line | `ADL_Series` | AD | GetAdl | ad | ad |
| ⭐ ADOSC - Chaikin Accumulation Distribution Oscillator | `ADOSC_Series` | ADOSC| GetAdl | adosc | adosc |
| ⭐ ATR - Average True Range | `ATR_Series` | ATR | GetAtr | atr | atr |
2022-11-14 11:06:00 -08:00
| ⭐ ATRP - Average True Range Percent | `ATRP_Series` || GetAtr ||
| ⛔ BETA - Beta coefficient || BETA | GetBeta ||
2022-11-26 22:04:26 -08:00
| ⭐ BBANDS - Bollinger Bands® | `BBANDS_Series` | BBANDS | GetBollingerBands || bbands |
2022-11-14 11:06:00 -08:00
| ⛔ CHAND - Chandelier Exit ||| GetChandelier ||
| ⛔ CRSI - Connor RSI ||| GetConnorsRsi ||
2022-11-26 22:04:26 -08:00
| ⛔ CVI - Chaikins Volatility ||||| cvi |
2022-11-14 11:06:00 -08:00
| ⛔ DON - Donchian Channels ||| GetDonchian ||
| ⛔ FCB - Fractal Chaos Bands ||| GetFcb ||
2022-11-26 22:04:26 -08:00
| ⛔ FISHER - Fisher Transform ||| GetFcb || fisher |
2022-11-14 11:06:00 -08:00
| ⛔ HV - Historical Volatility |||||
| ⛔ ICH - Ichimoku ||| GetIchimoku ||
| ⛔ KEL - Keltner Channels ||| GetKeltner ||
| ⛔ NATR - Normalized Average True Range || NATR | GetAtr ||
| ⛔ CHN - Price Channel Indicator |||||
| ⭐ RSI - Relative Strength Index | `RSI_Series` | RSI | GetRsi | rsi |
| ⛔ SAR - Parabolic Stop and Reverse || SAR | GetParabolicSar ||
| ⛔ SRSI - Stochastic RSI || STOCHRSI | GetStochRsi ||
| ⛔ STARC - Starc Bands |||||
| ⭐ TR - True Range | `TR_Series` | TRANGE | GetTr | true_range |
| ⛔ UI - Ulcer Index |||||
| ⛔ VSTOP - Volatility Stop |||||
||||||
2022-11-26 22:04:26 -08:00
| **MOMENTUM INDICATORS & OSCILLATORS** |
||||||
2022-11-14 11:06:00 -08:00
| ⛔ AC - Acceleration Oscillator |||||
2022-11-26 22:04:26 -08:00
| ⛔ ADX - Average Directional Movement Index || ADX | GetAdx || adx |
| ⛔ ADXR - Average Directional Movement Index Rating || ADXR | GetAdx || adxr |
| ⛔ AO - Awesome Oscillator ||| GetAwesome || ao |
| ⛔ APO - Absolute Price Oscillator || APO ||| apo |
| ⛔ AROON - Aroon oscillator || AROON | GetAroon || aroon |
| ⛔ BOP - Balance of Power || BOP | GetBop || bop |
| ⭐ CCI - Commodity Channel Index | `CCI_Series` | CCI | GetCci || cci |
2022-11-14 11:06:00 -08:00
| ⛔ CFO - Chande Forcast Oscillator |||||
2022-11-26 22:04:26 -08:00
| ⛔ CMO - Chande Momentum Oscillator || CMO | GetCmo || cmo |
2022-11-14 11:06:00 -08:00
| ⛔ COG - Center of Gravity |||||
| ⛔ COPPOCK - Coppock Curve |||||
| ⛔ CTI - Ehler's Correlation Trend Indicator |||||
| ⛔ DPO - Detrended Price Oscillator ||| GetDpo ||
| ⛔ DMI - Directional Movement Index || DX | GetAdx ||
| ⛔ EFI - Elder Ray's Force Index ||| GetElderRay ||
2022-11-26 22:04:26 -08:00
| ⛔ FOSC - Forecast oscillator ||||| fosc |
2022-11-14 11:06:00 -08:00
| ⛔ GAT - Alligator oscillator ||| GetGator ||
| ⛔ HURST - Hurst Exponent ||| GetHurst ||
| ⛔ KRI - Kairi Relative Index |||||
| ⛔ KVO - Klinger Volume Oscillator |||||
| ⛔ MFI - Money Flow Index || MFI | GetMfi ||
| ⛔ MOM - Momentum || MOM |||
| ⛔ NVI - Negative Volume Index |||||
| ⛔ PO - Price Oscillator |||||
| ⛔ PPO - Percentage Price Oscillator || PPO |||
| ⛔ PMO - Price Momentum Oscillator |||||
| ⛔ PVI - Positive Volume Index |||||
| ⛔ ROC - Rate of Change || MOM | GetRoc ||
| ⛔ RVGI - Relative Vigor Index |||||
| ⛔ SMI - Stochastic Momentum Index |||||
| ⛔ STC - Schaff Trend Cycle |||||
| ⛔ STOCH - Stochastic Oscillator || STOCH | GetStoch ||
| ⛔ TRIX - 1-day ROC of TEMA || TRIX | GetTrix ||
| ⛔ TSI - True Strength Index |||||
| ⛔ UO - Ultimate Oscillator || ULTOSC | GetUltimate ||
| ⛔ WILLR - Larry Williams' %R || WILLR | GetWilliamsR ||
| ⛔ WGAT - Williams Alligator |||||
||||||
2022-11-26 22:04:26 -08:00
| **VOLUME INDICATORS** |
||||||
2022-11-14 11:06:00 -08:00
| ⛔ AOBV - Archer On-Balance Volume |||||
| ⛔ CMF - Chaikin Money Flow |||||
2022-11-26 22:04:26 -08:00
| ⛔ EOM - Ease of Movement ||||| emv |
| ⛔ KVO - Klinger Volume Oscilaltor ||||| kvo |
2022-11-14 11:06:00 -08:00
| ⭐ OBV - On-Balance Volume | `OBV_Series` | OBV | GetObv ||
| ⛔ 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 |||||