This commit is contained in:
Miha Kralj
2022-12-24 16:18:30 -08:00
parent a12f4fedac
commit ddcb49995b
7 changed files with 193 additions and 357 deletions
+8 -8
View File
@@ -80,14 +80,14 @@ jobs:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coveragereport.xml coverage-reports: ./coveragereport.xml
# - name: Release - name: Release
# uses: marvinpinto/action-automatic-releases@latest uses: marvinpinto/action-automatic-releases@latest
# with: with:
# repo_token: "${{ secrets.GITHUB_TOKEN }}" repo_token: "${{ secrets.GITHUB_TOKEN }}"
# automatic_release_tag: "latest" automatic_release_tag: "latest"
# prerelease: true prerelease: true
# title: "Latest Build" title: "Latest Build"
# files: /Quantower/Settings/Scripts/Indicators/QuanTAlib/*.dll files: /Quantower/Settings/Scripts/Indicators/QuanTAlib/*.dll
- name: Authenticate to Github packages source - name: Authenticate to Github packages source
run: dotnet nuget add source run: dotnet nuget add source
-2
View File
@@ -9,7 +9,6 @@
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Python.Included" Version="3.11.1" />
<PackageReference Include="xunit" Version="2.4.2" /> <PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -18,7 +17,6 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221221-03" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221221-03" />
<PackageReference Include="TALib.NETCore" Version="0.4.4" /> <PackageReference Include="TALib.NETCore" Version="0.4.4" />
<PackageReference Include="Skender.Stock.Indicators" Version="2.4.5" /> <PackageReference Include="Skender.Stock.Indicators" Version="2.4.5" />
<PackageReference Include="pythonnet" Version="3.0.1" />
<PackageReference Include="Tulip.NETCore" Version="0.8.0.1" /> <PackageReference Include="Tulip.NETCore" Version="0.8.0.1" />
<PackageReference Include="System.Text.Json" Version="7.0.1" /> <PackageReference Include="System.Text.Json" Version="7.0.1" />
</ItemGroup> </ItemGroup>
+5 -4
View File
@@ -1,3 +1,4 @@
/*
using Xunit; using Xunit;
using System; using System;
using QuanTAlib; using QuanTAlib;
@@ -95,7 +96,7 @@ public class PandasTA : IDisposable
Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits)); Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
} }
} }
/*
[Fact] [Fact]
void CMO() { void CMO() {
CMO_Series QL = new(bars.Close, period, false); CMO_Series QL = new(bars.Close, period, false);
@@ -106,7 +107,7 @@ public class PandasTA : IDisposable
Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits)); Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
} }
} }
*/
[Fact] void DEMA() { [Fact] void DEMA() {
DEMA_Series QL = new(bars.Close, period, false); DEMA_Series QL = new(bars.Close, period, false);
var pta = df.ta.dema(close: df.close, length: period); var pta = df.ta.dema(close: df.close, length: period);
@@ -276,7 +277,6 @@ public class PandasTA : IDisposable
Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits)); Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
} }
} }
/*
[Fact] void SVARIANCE() { [Fact] void SVARIANCE() {
SVAR_Series QL = new(bars.Close, period); SVAR_Series QL = new(bars.Close, period);
var pta = df.ta.variance(close: df.close, length: period, ddof: 1); var pta = df.ta.variance(close: df.close, length: period, ddof: 1);
@@ -287,7 +287,7 @@ public class PandasTA : IDisposable
Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits)); Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
} }
} }
*/
[Fact] void T3() { [Fact] void T3() {
T3_Series QL = new(source: bars.Close, period: period, vfactor: 0.7, useNaN: false); T3_Series QL = new(source: bars.Close, period: period, vfactor: 0.7, useNaN: false);
var pta = df.ta.t3(close: df.close, length: period, a: 0.7); var pta = df.ta.t3(close: df.close, length: period, a: 0.7);
@@ -380,3 +380,4 @@ public class PandasTA : IDisposable
} }
} }
*/
+1 -9
View File
@@ -1,13 +1,5 @@
* [Home](/) * [Home](/)
* [Indicators](indicators.md "Indocators coverage") * [List of all Indicators](indicators.md "Indicators coverage")
* [SMA - Simple Moving Average](SMA.md "SMA - Simple Moving Average")
* [WMA - Weighted Moving Average](WMA.md "WMA - Weighted Moving Average")
* [EMA - Exponential Moving Average](EMA.md "EMA - Exponential Moving Average") * [EMA - Exponential Moving Average](EMA.md "EMA - Exponential Moving Average")
* [DEMA - Double Exponential Moving Average](DEMA.md "DEMA - Double Exponential Moving Average")
* [TEMA - Triple Exponential Moving Average](TEMA.md "TEMA - Triple Exponential Moving Average")
* [HMA - Hull Moving Average](HMA.md "HMA - Hull Moving Average")
* [ZLEMA - Zero-Lag Exponential Moving Average](ZLEMA.md "ZLEMA - Zero-Lag Exponential Moving Average")
* [KAMA - Kaufman Adaptive Moving Average](KAMA.md "KAMA - Kaufman Adaptive Moving Average")
* [MAMA - Mesa Adaptive Moving Average](MAMA.md "MAMA - Mesa Adaptive Moving Average")
+1
View File
@@ -13,6 +13,7 @@
<div id="app"></div> <div id="app"></div>
<script> <script>
window.$docsify = { window.$docsify = {
homepage: 'readme.md',
loadSidebar: true, loadSidebar: true,
subMaxLevel: 1, subMaxLevel: 1,
name: '', name: '',
+156 -156
View File
@@ -4,171 +4,171 @@
✔️= Validation tests passed ✔️= Validation tests passed
❌= Wrong implementation ❌= Issue
| **BASIC TRANSFORMS** | **QuanTAlib** | **TA-LIB** | **Skender** | **Pandas TA** | **Tulip** | |**BASIC TRANSFORMS**|**QuanTAlib**|**TA-LIB**|**Skender**|**Pandas TA**|**Tulip**|
|--|:--:|:--:|:--:|:--:|:--:| |--|:--:|:--:|:--:|:--:|:--:|
| OC2 - (Open+Close)/2 | `.OC2` || CandlePart.OC2 || |OC2 - (Open+Close)/2| `.OC2`||✔️CandlePart.OC2||
| HL2 - Median Price | `.HL2` | MEDPRICE | CandlePart.HL2 | hl2 | |HL2 - Median Price|`.HL2`|✔️MEDPRICE|✔️CandlePart.HL2|✔️hl2|✔️medprice|
| HLC3 - Typical Price | `.HLC3` | TYPPRICE | CandlePart.HLC3 | hlc3 | |HLC3 - Typical Price|`.HLC3`|✔️TYPPRICE|✔️CandlePart.HLC3|✔️hlc3|✔️typprice|
| OHL3 - (Open+High+Low)/3 | `.OHL3` || CandlePart.OHL3 || |OHL3 - (Open+High+Low)/3|`.OHL3`||✔️CandlePart.OHL3||
| OHLC4 - Average Price | `.OHLC4` | AVGPRICE | CandlePart.OHLC4 | ohlc4 | avgprice | |OHLC4 - Average Price|`.OHLC4`|✔️AVGPRICE|✔️CandlePart.OHLC4|✔️ohlc4|✔️avgprice|
| HLCC4 - Weighted Price | `.HLCC4` | WCLPRICE | CandlePart.HLCC4 || |HLCC4 - Weighted Price|`.HLCC4`|✔️WCLPRICE|||✔️wcprice|
| MIDPOINT - Midpoint value | `MIDPOINT_Series` | MIDPOINT || midpoint | |MIDPOINT - Midpoint value|`MIDPOINT_Series`|✔️MIDPOINT||midpoint|
| MIDPRICE - Midpoint price | `MIDPRICE_Series` | MIDPRICE || midprice | |MIDPRICE - Midpoint price|`MIDPRICE_Series`|✔️MIDPRICE||midprice|
| MAX - Max value | `MAX_Series` | MAX ||| max | |MAX - Max value|`MAX_Series`|✔️MAX|||max|
| MIN - Min value | `MIN_Series` | MIN ||| min | |MIN - Min value|`MIN_Series`|✔️MIN|||min|
| SUM - Summation | `SUM_Series` | SUM ||| sum | |SUM - Summation|`SUM_Series`|✔️SUM|||sum|
| ADD - Addition | `ADD_Series` | ADD ||| add | |ADD - Addition|`ADD_Series`|✔️ADD|||✔️add|
| SUB - Subtraction | `SUB_Series` | SUB ||| sub | |SUB - Subtraction|`SUB_Series`|✔️SUB|||✔️sub|
| MUL - Multiplication | `MUL_Series` | MUL ||| mul | |MUL - Multiplication|`MUL_Series`|✔️MUL|||✔️mul|
| DIV - Division | `DIV_Series` | DIV ||| div | |DIV - Division|`DIV_Series`|✔️DIV|||✔️div|
||||| |||||
| **STATISTICS & NUMERICAL ANALYSIS** | |**STATISTICS & NUMERICAL ANALYSIS**|
|||||| ||||||
|BIAS - Bias | `BIAS_Series` ||| ✔️bias | |BIAS - Bias|`BIAS_Series`|||✔️bias|
| CORR - Pearson's Correlation Coefficient | `CORR_Series` | CORREL | GetCorrelation || |CORR - Pearson's Correlation Coefficient|`CORR_Series`|✔️CORREL|✔️GetCorrelation||
| COVAR - Covariance | `COVAR_Series` || GetCorrelation || |COVAR - Covariance|`COVAR_Series`||✔️GetCorrelation||
| DECAY - Linear Decay ||||| decay | |DECAY - Linear Decay|||||decay|
| EDECAY - Exponential Decay ||||| edecay | |EDECAY - Exponential Decay|||||edecay|
| ENTROPY - Entropy | `ENTROPY_Series` ||| entropy | |ENTROPY - Entropy|`ENTROPY_Series`|||✔️entropy|
| KURTOSIS - Kurtosis | `KURT_Series` ||| kurtosis | |KURTOSIS - Kurtosis|`KURT_Series`|||✔️kurtosis|
| LINREG - Linear Regression | `LINREG_Series` || GetSlope || |LINREG - Linear Regression|`LINREG_Series`||✔️GetSlope||❌linreg|
| MAD - Mean Absolute Deviation | `MAD_Series` || GetSma | mad | |MAD - Mean Absolute Deviation|`MAD_Series`||✔️GetSmaAnalysis|✔️mad|
| MAPE - Mean Absolute Percent Error | `MAPE_Series` || GetSma || |MAPE - Mean Absolute Percent Error|`MAPE_Series`||✔️GetSmaAnalysis||
| MED - Median value | `MED_Series` ||| median | |MEDIAN - Median value|`MEDIAN_Series`|||✔️median|
| MSE - Mean Squared Error | `MSE_Series` || GetSma || |MSE - Mean Squared Error|`MSE_Series`||✔️GetSmaAnalysis||
| SKEW - Skewness |||| skew | |SKEW - Skewness||||skew|
| SDEV - Standard Deviation (Volatility) | `SDEV_Series` | STDDEV | GetStdDev | stdev | |SDEV - Standard Deviation (Volatility)|`SDEV_Series`|✔️STDDEV|✔️GetStdDev|✔️stdev|✔️stddev|
| SSDEV - Sample Standard Deviation | `SSDEV_Series` ||| stdev | |SSDEV - Sample Standard Deviation|`SSDEV_Series`|||✔️stdev|
| SMAPE - Symmetric Mean Absolute Percent Error | `SMAPE_Series` |||| |SMAPE - Symmetric Mean Absolute Percent Error|`SMAPE_Series`||||
| VAR - Population Variance | `VAR_Series` | VAR || variance | |VAR - Population Variance|`VAR_Series`|✔️VAR||✔️variance|✔️var|
| SVAR - Sample Variance | `SVAR_Series` ||| variance | |SVAR - Sample Variance|`SVAR_Series`|||✔️variance|
| QUANTILE - Quantile |||| quantile | |QUANTILE - Quantile||||quantile|
| WMAPE - Weighted Mean Absolute Percent Error | `WMAPE_Series` |||| |WMAPE - Weighted Mean Absolute Percent Error|`WMAPE_Series`||||
| ZSCORE - Number of standard deviations from mean | `ZSCORE_Series` || GetStdDev | zscore | |ZSCORE - Number of standard deviations from mean|`ZSCORE_Series`||✔️GetStdDev|✔️zscore|
|||||| ||||||
| **TREND INDICATORS & AVERAGES** | |**TREND INDICATORS & AVERAGES**|
|||||| ||||||
| AFIRMA - Autoregressive Finite Impulse Response Moving Average ||||| |AFIRMA - Autoregressive Finite Impulse Response Moving Average|||||
| ALMA - Arnaud Legoux Moving Average | `ALMA_Series` || GetAlma | alma | |ALMA - Arnaud Legoux Moving Average|`ALMA_Series`||✔️GetAlma|alma|
| ARIMA - Autoregressive Integrated Moving Average ||||| |DEMA - Double EMA Average|`DEMA_Series`|❌DEMA|❌GetDema|✔️dema|❌dema|
| ⭐DEMA - Double EMA Average | `DEMA_Series` | ✔️DEMA | ✔️GetDema | ✔️dema | ✔️dema | |DWMA - Double WMA Average|`DWMA_Series`|||||
| ⭐EMA - Exponential Moving Average | `EMA_Series` | ✔️EMA | ✔️GetEma | ✔️ema | ✔️ema | |⭐EMA - Exponential Moving Average|`EMA_Series`|✔️EMA|✔️GetEma|✔️ema|✔️ema|
| EPMA - Endpoint Moving Average ||| GetEpma || |EPMA - Endpoint Moving Average|||GetEpma||
| FRAMA - Fractal Adaptive Moving Average ||||| |FRAMA - Fractal Adaptive Moving Average|||||
| FWMA - Fibonacci's Weighted Moving Average |||| fwma | |FWMA - Fibonacci's Weighted Moving Average||||fwma|
| HILO - Gann High-Low Activator |||| hilo | |HILO - Gann High-Low Activator||||hilo|
| HEMA - Hull/EMA Average | `HEMA_Series` |||| |HEMA - Hull/EMA Average|`HEMA_Series`||||
| Hilbert Transform Instantaneous Trendline || HT_TRENDLINE | GetHtTrendline || |Hilbert Transform Instantaneous Trendline||HT_TRENDLINE|GetHtTrendline||
| ⭐HMA - Hull Moving Average | `HMA_Series` || ✔️GetHma | ✔️hma | ✔️hma | |⭐HMA - Hull Moving Average|`HMA_Series`||✔️GetHma|✔️hma|✔️hma|
| HWMA - Holt-Winter Moving Average |||| hwma | |HWMA - Holt-Winter Moving Average||||hwma|
| JMA - Jurik Moving Average | `JMA_Series` ||| jma || |JMA - Jurik Moving Average|`JMA_Series`|||jma||
| KAMA - Kaufman's Adaptive Moving Average | `KAMA_Series` | KAMA | GetKama | kama | kama | |KAMA - Kaufman's Adaptive Moving Average|`KAMA_Series`|KAMA|❌GetKama|✔️kama|❌kama|
| KDJ - KDJ Indicator (trend reversal) |||| kdj | |KDJ - KDJ Indicator (trend reversal)||||kdj|
| LSMA - Least Squares Moving Average ||||| |LSMA - Least Squares Moving Average|||GetEpma||
| MACD - Moving Average Convergence/Divergence | `MACD_Series` | MACD | GetMacd | macd | |MACD - Moving Average Convergence/Divergence|`MACD_Series`|❌MACD|❌GetMacd|macd|❌macd|
| MAMA - MESA Adaptive Moving Average | `MAMA_Series` | MAMA | GetMama || |MAMA - MESA Adaptive Moving Average|`MAMA_Series`|✔️MAMA|✔️GetMama||
| MCGD - McGinley Dynamic |||| mcgd | |MCGD - McGinley Dynamic||||mcgd|
| MMA - Modified Moving Average ||||| |MMA - Modified Moving Average|||||
| PPMA - Pivot Point Moving Average ||||| |PPMA - Pivot Point Moving Average|||||
| PWMA - Pascal's Weighted Moving Average |||| pwma | |PWMA - Pascal's Weighted Moving Average||||pwma|
| RMA - WildeR's Moving Average | `RMA_Series` ||| rma | |RMA - WildeR's Moving Average|`RMA_Series`|||✔️rma|✔️rma|
| SINWMA - Sine Weighted Moving Average |||| sinwma | |SINWMA - Sine Weighted Moving Average||||sinwma|
| ⭐[SMA - Simple Moving Average](SMA.md) | `SMA_Series` | ✔️SMA | ✔️GetSma | ✔️sma | ✔️sma | |SMA - Simple Moving Average|`SMA_Series`|✔️SMA|✔️GetSma|✔️sma|✔️sma|
| SMMA - Smoothed Moving Average | `SMMA_Series` || GetSmma || |SMMA - Smoothed Moving Average|`SMMA_Series`||✔️GetSmma||
| SSF - Ehler's Super Smoother Filter |||| ssf | |SSF - Ehler's Super Smoother Filter||||ssf|
| SUPERTREND - Supertrend |||| supertrend | |SUPERTREND - Supertrend||||supertrend|
| SWMA - Symmetric Weighted Moving Average |||| swma | |SWMA - Symmetric Weighted Moving Average||||swma|
| T3 - Tillson T3 Moving Average | `T3_Series` | T3 | GetT3 | t3 | |T3 - Tillson T3 Moving Average|`T3_Series`|❌T3|❌GetT3|✔️t3|
| TEMA - Triple EMA Average | `TEMA_Series` | TEMA | GetTema | tema | |TEMA - Triple EMA Average|`TEMA_Series`|✔️TEMA|✔️GetTema|✔️tema|❌tema|
| TRIMA - Triangular Moving Average | `TRIMA_Series` | TRIMA || trima | |TRIMA - Triangular Moving Average|`TRIMA_Series`|✔️TRIMA||✔️trima|✔️trima|
| TSF - Time Series Forecast || TSF ||| |TSF - Time Series Forecast||TSF|||
| VIDYA - Variable Index Dynamic Average |||| vidya | |VIDYA - Variable Index Dynamic Average||||vidya|vidya|
| VORTEX - Vortex Indicator |||| vortex | |VORTEX - Vortex Indicator||||vortex|
| WMA - Weighted Moving Average | `WMA_Series` | WMA | GetWma | wma | |WMA - Weighted Moving Average|`WMA_Series`|✔️WMA|✔️GetWma|✔️wma|✔️wma|
| ZLEMA - Zero Lag EMA Average | `ZLEMA_Series` ||| zlma | |ZLEMA - Zero Lag EMA Average|`ZLEMA_Series`|||✔️zlma|❌zlema|
|||||| ||||||
| **VOLATILITY INDICATORS** | |**VOLATILITY INDICATORS**|
|||||| ||||||
| ⭐ADL - Chaikin Accumulation Distribution Line | `ADL_Series` | ✔️AD | ✔️GetAdl | ✔️ad | ✔️ad | |⭐ADL - Chaikin Accumulation Distribution Line|`ADL_Series`|✔️AD|✔️GetAdl|✔️ad|✔️ad|
| ⭐ADOSC - Chaikin Accumulation Distribution Oscillator | `ADOSC_Series` | ✔️ADOSC| | ✔️adosc | ✔️adosc | |⭐ADOSC - Chaikin Accumulation Distribution Oscillator|`ADOSC_Series`|✔️ADOSC||✔️adosc|✔️adosc|
|ATR - Average True Range | `ATR_Series` | ✔️ATR | ✔️GetAtr | ✔️atr | ✔️atr | |ATR - Average True Range|`ATR_Series`|✔️ATR|❌GetAtr|✔️atr|✔️atr|
| ATRP - Average True Range Percent | `ATRP_Series` || GetAtr || |ATRP - Average True Range Percent|`ATRP_Series`||GetAtr||
| BETA - Beta coefficient || BETA | GetBeta || |BETA - Beta coefficient||BETA|GetBeta||
| BBANDS - Bollinger Bands® | `BBANDS_Series` | BBANDS | GetBollingerBands || bbands | |BBANDS - Bollinger Bands®|`BBANDS_Series`|✔️BBANDS|✔️GetBollingerBands||✔️bbands|
| CHAND - Chandelier Exit ||| GetChandelier || |CHAND - Chandelier Exit|||GetChandelier||
| CRSI - Connor RSI ||| GetConnorsRsi || |CRSI - Connor RSI|||GetConnorsRsi||
| CVI - Chaikins Volatility ||||| cvi | |CVI - Chaikins Volatility|||||cvi|
| DON - Donchian Channels ||| GetDonchian || |DON - Donchian Channels|||GetDonchian||
| FCB - Fractal Chaos Bands ||| GetFcb || |FCB - Fractal Chaos Bands|||GetFcb||
| FISHER - Fisher Transform ||| GetFcb || fisher | |FISHER - Fisher Transform|||GetFcb||fisher|
| HV - Historical Volatility ||||| |HV - Historical Volatility|||||
| ICH - Ichimoku ||| GetIchimoku || |ICH - Ichimoku|||GetIchimoku||
| KEL - Keltner Channels ||| GetKeltner || |KEL - Keltner Channels|||GetKeltner||
| NATR - Normalized Average True Range || NATR | GetAtr || |NATR - Normalized Average True Range||NATR|GetAtr||
| CHN - Price Channel Indicator ||||| |CHN - Price Channel Indicator|||||
| RSI - Relative Strength Index | `RSI_Series` | RSI | GetRsi | rsi | |RSI - Relative Strength Index|`RSI_Series`|✔️RSI|✔️GetRsi|✔️rsi|✔️rsi|
| SAR - Parabolic Stop and Reverse || SAR | GetParabolicSar || |SAR - Parabolic Stop and Reverse||SAR|GetParabolicSar||
| SRSI - Stochastic RSI || STOCHRSI | GetStochRsi || |SRSI - Stochastic RSI||STOCHRSI|GetStochRsi||
| STARC - Starc Bands ||||| |STARC - Starc Bands|||||
| TR - True Range | `TR_Series` | TRANGE | GetTr | true_range | |TR - True Range|`TR_Series`|✔️TRANGE|✔️GetTr|✔️true_range|✔️tr|
| UI - Ulcer Index ||||| |UI - Ulcer Index|||||
| VSTOP - Volatility Stop ||||| |VSTOP - Volatility Stop|||||
|||||| ||||||
| **MOMENTUM INDICATORS & OSCILLATORS** | |**MOMENTUM INDICATORS & OSCILLATORS**|
|||||| ||||||
| AC - Acceleration Oscillator ||||| |AC - Acceleration Oscillator|||||
| ADX - Average Directional Movement Index || ADX | GetAdx || adx | |ADX - Average Directional Movement Index||ADX|GetAdx||adx|
| ADXR - Average Directional Movement Index Rating || ADXR | GetAdx || adxr | |ADXR - Average Directional Movement Index Rating||ADXR|GetAdx||adxr|
| AO - Awesome Oscillator ||| GetAwesome || ao | |AO - Awesome Oscillator|||GetAwesome||ao|
| APO - Absolute Price Oscillator || APO ||| apo | |APO - Absolute Price Oscillator||APO|||apo|
| AROON - Aroon oscillator || AROON | GetAroon || aroon | |AROON - Aroon oscillator||AROON|GetAroon||aroon|
| BOP - Balance of Power || BOP | GetBop || bop | |BOP - Balance of Power||BOP|GetBop||bop|
| CCI - Commodity Channel Index | `CCI_Series` | CCI | GetCci || cci | |CCI - Commodity Channel Index|`CCI_Series`|✔️CCI|✔️GetCci||cci|
| CFO - Chande Forcast Oscillator ||||| |CFO - Chande Forcast Oscillator|||||
| CMO - Chande Momentum Oscillator | `CMO_Series` | ❌CMO | ❌GetCmo | ❌cmo | cmo | |CMO - Chande Momentum Oscillator|`CMO_Series`|❌CMO|✔️GetCmo|❌cmo|✔️cmo|
| COG - Center of Gravity ||||| |COG - Center of Gravity|||||
| COPPOCK - Coppock Curve ||||| |COPPOCK - Coppock Curve|||||
| CTI - Ehler's Correlation Trend Indicator ||||| |CTI - Ehler's Correlation Trend Indicator|||||
| DPO - Detrended Price Oscillator ||| GetDpo || |DPO - Detrended Price Oscillator|||GetDpo||
| DMI - Directional Movement Index || DX | GetAdx || |DMI - Directional Movement Index||DX|GetAdx||
| EFI - Elder Ray's Force Index ||| GetElderRay || |EFI - Elder Ray's Force Index|||GetElderRay||
| FOSC - Forecast oscillator ||||| fosc | |FOSC - Forecast oscillator|||||fosc|
| GAT - Alligator oscillator ||| GetGator || |GAT - Alligator oscillator|||GetGator||
| HURST - Hurst Exponent ||| GetHurst || |HURST - Hurst Exponent|||GetHurst||
| KRI - Kairi Relative Index ||||| |KRI - Kairi Relative Index|||||
| KVO - Klinger Volume Oscillator ||||| |KVO - Klinger Volume Oscillator||||||
| MFI - Money Flow Index || MFI | GetMfi || |MFI - Money Flow Index||MFI|GetMfi||
| MOM - Momentum || MOM ||| |MOM - Momentum||MOM|||
| NVI - Negative Volume Index ||||| |NVI - Negative Volume Index|||||
| PO - Price Oscillator ||||| |PO - Price Oscillator|||||
| PPO - Percentage Price Oscillator || PPO ||| |PPO - Percentage Price Oscillator||PPO|||
| PMO - Price Momentum Oscillator ||||| |PMO - Price Momentum Oscillator|||||
| PVI - Positive Volume Index ||||| |PVI - Positive Volume Index|||||
| ROC - Rate of Change || MOM | GetRoc || |ROC - Rate of Change||MOM|GetRoc||
| RVGI - Relative Vigor Index ||||| |RVGI - Relative Vigor Index|||||
| SMI - Stochastic Momentum Index ||||| |SMI - Stochastic Momentum Index|||||
| STC - Schaff Trend Cycle ||||| |STC - Schaff Trend Cycle|||||
| STOCH - Stochastic Oscillator || STOCH | GetStoch || |STOCH - Stochastic Oscillator||STOCH|GetStoch||
| TRIX - 1-day ROC of TEMA | TRIX | TRIX | GetTrix | trix | |TRIX - 1-day ROC of TEMA|`TRIX_Series`|❌TRIX|❌GetTrix|✔️trix|❌trix|
| TSI - True Strength Index ||||| |TSI - True Strength Index|||||
| UO - Ultimate Oscillator || ULTOSC | GetUltimate || |UO - Ultimate Oscillator||ULTOSC|GetUltimate||ultosc|
| WILLR - Larry Williams' %R || WILLR | GetWilliamsR || |WILLR - Larry Williams' %R||WILLR|GetWilliamsR||willr|
| WGAT - Williams Alligator ||||| |WGAT - Williams Alligator|||||
|||||| ||||||
| **VOLUME INDICATORS** | |**VOLUME INDICATORS**|
|||||| ||||||
| AOBV - Archer On-Balance Volume ||||| |AOBV - Archer On-Balance Volume|||||
| CMF - Chaikin Money Flow ||||| |CMF - Chaikin Money Flow|||||
| EOM - Ease of Movement ||||| emv | |EOM - Ease of Movement|||||emv|
| KVO - Klinger Volume Oscilaltor ||||| kvo | |KVO - Klinger Volume Oscilaltor|||||kvo|
| OBV - On-Balance Volume | `OBV_Series` | OBV | GetObv || |OBV - On-Balance Volume|`OBV_Series`|✔️OBV|✔️GetObv|✔️obv|❌obv|
| PRS - Price Relative Strength |||| |PRS - Price Relative Strength||||
| PVOL - Price-Volume ||||| |PVOL - Price-Volume|||||
| PVO - Percentage Volume Oscillator ||||| |PVO - Percentage Volume Oscillator|||||
| PVR - Price Volume Rank ||||| |PVR - Price Volume Rank|||||
| PVT - Price Volume Trend ||||| |PVT - Price Volume Trend|||||
| VP - Volume Profile ||||| |VP - Volume Profile|||||
| VWAP - Volume Weighted Average Price ||||| |VWAP - Volume Weighted Average Price|||||
| VWMA - Volume Weighted Moving Average ||||| |VWMA - Volume Weighted Moving Average|||||vwma|
+21 -177
View File
@@ -12,191 +12,35 @@
[![GitHub watchers](https://img.shields.io/github/watchers/mihakralj/QuanTAlib?style=flat-square)](https://github.com/mihakralj/QuanTAlib/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/mihakralj/QuanTAlib?style=flat-square)](https://github.com/mihakralj/QuanTAlib/watchers)
[![.NET7.0](https://img.shields.io/badge/.NET-7.0%20%7C%206.0%20%7C%204.8-blue?style=flat-square)](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) [![.NET7.0](https://img.shields.io/badge/.NET-7.0%20%7C%206.0%20%7C%204.8-blue?style=flat-square)](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
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. **Quan**titative **TA** **lib**rary (QuanTAlib) is a C# library of classess and methods for quantitative technical analysis useful for trading securities with [Quantower](https://www.quantower.com/) and other C#-based trading platforms.
**QuanTAlib** is written with some specific design criteria in mind - some reasons why there is '_yet another C# TA library_': **QuanTAlib** is written with some specific design criteria in mind - some reasons why there is '_yet another C# TA library_':
- 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 streaming analysis** (adding one data item at the time without the need to re-calculate the whole history)
- 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) - **Calculate early data right** - no hiding of incomplete calculations with NaN values (unless explicitly requested), data is as valid as mathematically possible from the first value
- 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 for communication between indicators - each data series is an event publisher, each indicator can be a subscriber - this allows easy and seamless data flow between indicators
- 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.
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. If not obvious, QuanTAlib is intended for developers, and it does not focus on sources of OHLCV quotes. There are some very basic data feeds available to use in the learning process: `RND_Feed` and `GBM_Feed` for random data, `Yahoo_Feed` and `Alphavantage_Feed` for a quick grab of daily data of US stock market.
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. 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.
## Coverage ### Coverage
⭐= Calculation is validated against other TA libraries [List of all indicators - current and planned](indicators.md)
✔️= Calculation exists but has no cross-validation tests - **Basic calculations:** ADD, DIV, MAX, MIDPOINT, MIDPRICE, MIN, MUL, SUB, SUM, ZL
- **Momentum:** CCI
- **Statistics:** BIAS, VORR, COVAR, ENTROPY, KURTOSIS, LINREG, MAD, MAPE, MEDIAN, MSE, SDEV, SMAPE, SSDEV, SVAR, VAR, WMAPE, ZSCORE
- **Trends:** ALMA, DEMA, DWMA, 3EMA, HEMA, HMA, JMA, KAMA, MACD, MAMA, RMA, SMA, SMMA, T3, TEMA, TRIMA, TRIX, WMA, ZLEMA
- **Volatility:** ADL, ADOSC, ATR, ATRP, BBANDS, CMO, RSI
- **Volume:** OBV
- **Feeds:** GBM, RND, Yahoo, Alphavantage
⛔= Not implemented (yet) ### Validation
| **BASIC TRANSFORMS** | **QuanTAlib** | **TA-LIB** | **Skender** | **Pandas TA** | **Tulip** | QuanTAlib uses validation tests with four other TA libraries to assure accuracy and validity of results:
|--|:--:|:--:|:--:|:--:|:--:|
| ⭐ OC2 - (Open+Close)/2 | `.OC2` || CandlePart.OC2 || - [TA-LIB](https://www.ta-lib.org/function.html)
| ⭐ HL2 - Median Price | `.HL2` | MEDPRICE | CandlePart.HL2 | hl2 | - [Skender Stock Indicators](https://dotnet.stockindicators.dev/)
| ⭐ HLC3 - Typical Price | `.HLC3` | TYPPRICE | CandlePart.HLC3 | hlc3 | - [Pandas-TA](https://twopirllc.github.io/pandas-ta/)
| ⭐ OHL3 - (Open+High+Low)/3 | `.OHL3` || CandlePart.OHL3 || - [Tulip Indicators](https://tulipindicators.org/)
| ⭐ OHLC4 - Average Price | `.OHLC4` | AVGPRICE | CandlePart.OHLC4 | ohlc4 | avgprice |
| ⭐ HLCC4 - Weighted Price | `.HLCC4` | WCLPRICE | CandlePart.HLCC4 ||
| ⭐ MIDPOINT - Midpoint value | `MIDPOINT_Series` | MIDPOINT || midpoint |
| ⭐ MIDPRICE - Midpoint price | `MIDPRICE_Series` | MIDPRICE || midprice |
| ⭐ 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 |
|||||
| **STATISTICS & NUMERICAL ANALYSIS** |
||||||
| ⭐ BIAS - Bias | `BIAS_Series` ||| bias |
| ⭐ CORR - Pearson's Correlation Coefficient | `CORR_Series` | CORREL | GetCorrelation ||
| ⭐ COVAR - Covariance | `COVAR_Series` || GetCorrelation ||
| ⛔ DECAY - Linear Decay ||||| decay |
| ⛔ EDECAY - Exponential Decay ||||| edecay |
| ⭐ ENTROPY - Entropy | `ENTROPY_Series` ||| entropy |
| ⭐ KURTOSIS - Kurtosis | `KURT_Series` ||| kurtosis |
| ⭐ 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 |
| ⭐ 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 |
| ✔️ SMAPE - Symmetric Mean Absolute Percent Error | `SMAPE_Series` ||||
| ⭐ VAR - Population Variance | `VAR_Series` | VAR || variance |
| ⭐ SVAR - Sample Variance | `SVAR_Series` ||| variance |
| ⛔ QUANTILE - Quantile |||| quantile |
| ✔️ WMAPE - Weighted Mean Absolute Percent Error | `WMAPE_Series` ||||
| ⭐ ZSCORE - Number of standard deviations from mean | `ZSCORE_Series` || GetStdDev | zscore |
||||||
| **TREND INDICATORS & AVERAGES** |
||||||
| ⛔ AFIRMA - Autoregressive Finite Impulse Response Moving Average |||||
| ⭐ ALMA - Arnaud Legoux Moving Average | `ALMA_Series` || GetAlma | alma |
| ⛔ ARIMA - Autoregressive Integrated Moving Average |||||
| ⭐ DEMA - Double EMA Average | `DEMA_Series` | DEMA | GetDema | dema | dema |
| ⭐ EMA - Exponential Moving Average | `EMA_Series` | EMA | GetEma | ema | ema |
| ⛔ EPMA - Endpoint Moving Average ||| GetEpma ||
| ⛔ FRAMA - Fractal Adaptive Moving Average |||||
| ⛔ FWMA - Fibonacci's Weighted Moving Average |||| fwma |
| ⛔ HILO - Gann High-Low Activator |||| hilo |
| ✔️ HEMA - Hull/EMA Average | `HEMA_Series` ||||
| ⛔ Hilbert Transform Instantaneous Trendline || HT_TRENDLINE | GetHtTrendline ||
| ⭐ HMA - Hull Moving Average | `HMA_Series` || GetHma | hma | hma |
| ⛔ HWMA - Holt-Winter Moving Average |||| hwma |
| ✔️ JMA - Jurik Moving Average | `JMA_Series` ||| jma |
| ⭐ KAMA - Kaufman's Adaptive Moving Average | `KAMA_Series` | KAMA | GetKama | kama | kama |
| ⛔ KDJ - KDJ Indicator (trend reversal) |||| kdj |
| ⛔ LSMA - Least Squares Moving Average |||||
| ⭐ MACD - Moving Average Convergence/Divergence | `MACD_Series` | MACD | GetMacd | macd |
| ⭐ MAMA - MESA Adaptive Moving Average | `MAMA_Series` | MAMA | GetMama ||
| ⛔ MCGD - McGinley Dynamic |||| mcgd |
| ⛔ MMA - Modified Moving Average |||||
| ⛔ PPMA - Pivot Point Moving Average |||||
| ⛔ PWMA - Pascal's Weighted Moving Average |||| pwma |
| ⭐ RMA - WildeR's Moving Average | `RMA_Series` ||| rma |
| ⛔ SINWMA - Sine Weighted Moving Average |||| sinwma |
| ⭐ SMA - Simple Moving Average | `SMA_Series` | SMA | GetSma | sma |
| ⭐ SMMA - Smoothed Moving Average | `SMMA_Series` || GetSmma ||
| ⛔ SSF - Ehler's Super Smoother Filter |||| ssf |
| ⛔ SUPERTREND - Supertrend |||| supertrend |
| ⛔ SWMA - Symmetric Weighted Moving Average |||| swma |
| ⭐ T3 - Tillson T3 Moving Average | `T3_Series` | T3 | GetT3 | t3 |
| ⭐ TEMA - Triple EMA Average | `TEMA_Series` | TEMA | GetTema | tema |
| ⭐ TRIMA - Triangular Moving Average | `TRIMA_Series` | TRIMA || trima |
| ⛔ TSF - Time Series Forecast || TSF |||
| ⛔ VIDYA - Variable Index Dynamic Average |||| vidya |
| ⛔ VORTEX - Vortex Indicator |||| vortex |
| ⭐ WMA - Weighted Moving Average | `WMA_Series` | WMA | GetWma | wma |
| ⭐ ZLEMA - Zero Lag EMA Average | `ZLEMA_Series` ||| zlma |
||||||
| **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 |
| ⭐ ATRP - Average True Range Percent | `ATRP_Series` || GetAtr ||
| ⛔ BETA - Beta coefficient || BETA | GetBeta ||
| ⭐ BBANDS - Bollinger Bands® | `BBANDS_Series` | BBANDS | GetBollingerBands || bbands |
| ⛔ CHAND - Chandelier Exit ||| GetChandelier ||
| ⛔ CRSI - Connor RSI ||| GetConnorsRsi ||
| ⛔ CVI - Chaikins Volatility ||||| cvi |
| ⛔ DON - Donchian Channels ||| GetDonchian ||
| ⛔ FCB - Fractal Chaos Bands ||| GetFcb ||
| ⛔ FISHER - Fisher Transform ||| GetFcb || fisher |
| ⛔ 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 |||||
||||||
| **MOMENTUM INDICATORS & OSCILLATORS** |
||||||
| ⛔ AC - Acceleration Oscillator |||||
| ⛔ 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 |
| ⛔ CFO - Chande Forcast Oscillator |||||
| ⛔ CMO - Chande Momentum Oscillator || CMO | GetCmo || cmo |
| ⛔ 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 ||
| ⛔ FOSC - Forecast oscillator ||||| fosc |
| ⛔ 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 |||||
||||||
| **VOLUME INDICATORS** |
||||||
| ⛔ AOBV - Archer On-Balance Volume |||||
| ⛔ CMF - Chaikin Money Flow |||||
| ⛔ EOM - Ease of Movement ||||| emv |
| ⛔ KVO - Klinger Volume Oscilaltor ||||| kvo |
| ⭐ 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 |||||