Codacy cleanup

This commit is contained in:
Miha Kralj
2022-11-14 17:38:37 -08:00
parent 6907c3d92d
commit 39bb7b8a91
15 changed files with 563 additions and 476 deletions
+1
View File
@@ -103,6 +103,7 @@ jobs:
--skip-duplicate --skip-duplicate
- name: Push package to nuget.org - name: Push package to nuget.org
if: ${{ github.ref == 'refs/heads/main' }}
run: dotnet nuget push '.\Source\bin\Release\QuanTAlib.*.nupkg' run: dotnet nuget push '.\Source\bin\Release\QuanTAlib.*.nupkg'
--api-key ${{ secrets.NUGET_DEPLOY_KEY_QUANTLIB }} --api-key ${{ secrets.NUGET_DEPLOY_KEY_QUANTLIB }}
--source https://api.nuget.org/v3/index.json --source https://api.nuget.org/v3/index.json
-1
View File
@@ -23,7 +23,6 @@ public class MAX_Series : Single_TSeries_Indicator
double _max = TValue.v; double _max = TValue.v;
for (int i = 0; i < this._buffer.Count; i++) for (int i = 0; i < this._buffer.Count; i++)
{ {
//_max = (this._buffer[i] > _max) ? this._buffer[i] : _max;
_max = Math.Max(this._buffer[i], _max); _max = Math.Max(this._buffer[i], _max);
} }
+43 -43
View File
@@ -1,44 +1,44 @@
namespace QuanTAlib; namespace QuanTAlib;
using System; using System;
/* <summary> /* <summary>
MIDPOINT: Midpoint value (max+min)/2 in the given period in the series. MIDPOINT: Midpoint value (max+min)/2 in the given period in the series.
If period = 0 => period = full length of the series If period = 0 => period = full length of the series
Sources: Sources:
https://thefaqblog.com/what-is-the-midpoint-in-statistics/ https://thefaqblog.com/what-is-the-midpoint-in-statistics/
</summary> */ </summary> */
public class MIDPOINT_Series : Single_TSeries_Indicator public class MIDPOINT_Series : Single_TSeries_Indicator
{ {
public MIDPOINT_Series(TSeries source, int period, bool useNaN = false) : base(source, period, useNaN) public MIDPOINT_Series(TSeries source, int period, bool useNaN = false) : base(source, period, useNaN)
{ {
if (base._data.Count > 0) if (base._data.Count > 0)
{ base.Add(base._data); } { base.Add(base._data); }
} }
private readonly System.Collections.Generic.List<double> _buffer = new(); private readonly System.Collections.Generic.List<double> _buffer = new();
public override void Add((DateTime t, double v) TValue, bool update) public override void Add((DateTime t, double v) TValue, bool update)
{ {
if (update) if (update)
{ this._buffer[this._buffer.Count - 1] = TValue.v; } { this._buffer[this._buffer.Count - 1] = TValue.v; }
else else
{ this._buffer.Add(TValue.v); } { this._buffer.Add(TValue.v); }
if (this._buffer.Count > this._p && this._p != 0) if (this._buffer.Count > this._p && this._p != 0)
{ this._buffer.RemoveAt(0); } { this._buffer.RemoveAt(0); }
double _max = TValue.v; double _max = TValue.v;
double _min = TValue.v; double _min = TValue.v;
for (int i = 0; i < this._buffer.Count; i++) for (int i = 0; i < this._buffer.Count; i++)
{ {
_max = Math.Max(this._buffer[i], _max); _max = Math.Max(this._buffer[i], _max);
_min = Math.Min(this._buffer[i], _min); _min = Math.Min(this._buffer[i], _min);
} }
double _mid = (_max + _min) * 0.5; double _mid = (_max + _min) * 0.5;
var result = (TValue.t, this.Count < this._p - 1 && this._NaN ? double.NaN : _mid); var result = (TValue.t, this.Count < this._p - 1 && this._NaN ? double.NaN : _mid);
base.Add(result, update); base.Add(result, update);
} }
} }
+49 -49
View File
@@ -1,50 +1,50 @@
namespace QuanTAlib; namespace QuanTAlib;
using System; using System;
/* <summary> /* <summary>
MIDPRICE: Midpoint price (highhest high + lowest low)/2 in the given period in the series. MIDPRICE: Midpoint price (highhest high + lowest low)/2 in the given period in the series.
If period = 0 => period = full length of the series If period = 0 => period = full length of the series
</summary> */ </summary> */
public class MIDPRICE_Series : Single_TBars_Indicator public class MIDPRICE_Series : Single_TBars_Indicator
{ {
public MIDPRICE_Series(TBars source, int period, bool useNaN = false) : base(source, period, useNaN) public MIDPRICE_Series(TBars source, int period, bool useNaN = false) : base(source, period, useNaN)
{ {
if (base._bars.Count > 0) if (base._bars.Count > 0)
{ base.Add(base._bars); } { base.Add(base._bars); }
} }
private readonly System.Collections.Generic.List<double> _bufferhi = new(); private readonly System.Collections.Generic.List<double> _bufferhi = new();
private readonly System.Collections.Generic.List<double> _bufferlo = new(); private readonly System.Collections.Generic.List<double> _bufferlo = new();
public override void Add((DateTime t, double o, double h, double l, double c, double v) TBar, bool update) public override void Add((DateTime t, double o, double h, double l, double c, double v) TBar, bool update)
{ {
if (update) if (update)
{ {
this._bufferhi[this._bufferhi.Count - 1] = TBar.h; this._bufferhi[this._bufferhi.Count - 1] = TBar.h;
this._bufferlo[this._bufferlo.Count - 1] = TBar.l; this._bufferlo[this._bufferlo.Count - 1] = TBar.l;
} }
else else
{ {
this._bufferhi.Add(TBar.h); this._bufferhi.Add(TBar.h);
this._bufferlo.Add(TBar.l); this._bufferlo.Add(TBar.l);
} }
if (this._bufferhi.Count > this._p && this._p != 0) if (this._bufferhi.Count > this._p && this._p != 0)
{ this._bufferhi.RemoveAt(0); } { this._bufferhi.RemoveAt(0); }
if (this._bufferlo.Count > this._p && this._p != 0) if (this._bufferlo.Count > this._p && this._p != 0)
{ this._bufferlo.RemoveAt(0); } { this._bufferlo.RemoveAt(0); }
double _max = TBar.h; double _max = TBar.h;
double _min = TBar.l; double _min = TBar.l;
for (int i = 0; i < this._bufferhi.Count; i++) for (int i = 0; i < this._bufferhi.Count; i++)
{ {
_max = Math.Max(this._bufferhi[i], _max); _max = Math.Max(this._bufferhi[i], _max);
_min = Math.Min(this._bufferlo[i], _min); _min = Math.Min(this._bufferlo[i], _min);
} }
double _mid = (_max + _min) * 0.5; double _mid = (_max + _min) * 0.5;
var result = (TBar.t, this.Count < this._p - 1 && this._NaN ? double.NaN : _mid); var result = (TBar.t, this.Count < this._p - 1 && this._NaN ? double.NaN : _mid);
base.Add(result, update); base.Add(result, update);
} }
} }
-1
View File
@@ -23,7 +23,6 @@ public class MIN_Series : Single_TSeries_Indicator
double _min = TValue.v; double _min = TValue.v;
for (int i = 0; i < this._buffer.Count; i++) for (int i = 0; i < this._buffer.Count; i++)
{ {
//_min = (this._buffer[i] < _min) ? this._buffer[i] : _min;
_min = Math.Min(this._buffer[i], _min); _min = Math.Min(this._buffer[i], _min);
} }
+35 -35
View File
@@ -1,35 +1,35 @@
namespace QuanTAlib; namespace QuanTAlib;
using System; using System;
/* <summary> /* <summary>
SUM: Cumulative Sum (aka Running Total) SUM: Cumulative Sum (aka Running Total)
SUM across a period provides a rolling sum of all values across the period. SUM across a period provides a rolling sum of all values across the period.
If SUM values would be divided with period, the output would be SMA() If SUM values would be divided with period, the output would be SMA()
Sources: Sources:
https://en.wikipedia.org/wiki/CUSUM https://en.wikipedia.org/wiki/CUSUM
</summary> */ </summary> */
public class SUM_Series : Single_TSeries_Indicator public class SUM_Series : Single_TSeries_Indicator
{ {
public SUM_Series(TSeries source, int period, bool useNaN = false) : base(source, period, useNaN) public SUM_Series(TSeries source, int period, bool useNaN = false) : base(source, period, useNaN)
{ {
if (base._data.Count > 0) { base.Add(base._data); } if (base._data.Count > 0) { base.Add(base._data); }
} }
private readonly System.Collections.Generic.List<double> _buffer = new(); private readonly System.Collections.Generic.List<double> _buffer = new();
public override void Add((System.DateTime t, double v) TValue, bool update) public override void Add((System.DateTime t, double v) TValue, bool update)
{ {
if (update) { _buffer[_buffer.Count - 1] = TValue.v; } if (update) { _buffer[_buffer.Count - 1] = TValue.v; }
else { _buffer.Add(TValue.v); } else { _buffer.Add(TValue.v); }
if (_buffer.Count > this._p && this._p != 0) { _buffer.RemoveAt(0); } if (_buffer.Count > this._p && this._p != 0) { _buffer.RemoveAt(0); }
double _sum = 0; double _sum = 0;
for (int i = 0; i < _buffer.Count; i++) { _sum += _buffer[i]; } for (int i = 0; i < _buffer.Count; i++) { _sum += _buffer[i]; }
var result = (TValue.t, (this.Count < this._p - 1 && this._NaN) ? double.NaN : _sum); var result = (TValue.t, (this.Count < this._p - 1 && this._NaN) ? double.NaN : _sum);
base.Add(result, update); base.Add(result, update);
} }
} }
+2 -3
View File
@@ -8,8 +8,6 @@ Alphavantage - Free API to collect 100 recent daily quotes. It requires a (free)
Parameters: Parameters:
Symbol: stock ("AAPL"), Symbol: stock ("AAPL"),
APIkey: unique Alphavantage API key APIkey: unique Alphavantage API key
Usage:
Alphavantage_Feed ticker = new("MSFT", APIkey:"xxxxxxx");
</summary> */ </summary> */
@@ -47,9 +45,10 @@ public class Alphavantage_Feed : TBars
case "3b. low (USD)": l = Convert.ToDouble(val.Value.ToString()); break; case "3b. low (USD)": l = Convert.ToDouble(val.Value.ToString()); break;
case "4. close": c = Convert.ToDouble(val.Value.ToString()); break; case "4. close": c = Convert.ToDouble(val.Value.ToString()); break;
case "4b. close (USD)": c = Convert.ToDouble(val.Value.ToString()); break; case "4b. close (USD)": c = Convert.ToDouble(val.Value.ToString()); break;
//case "5. adjusted close": c = Convert.ToDouble(val.Value.ToString()); break; case "5. adjusted close": c = Convert.ToDouble(val.Value.ToString()); break;
case "5. volume": v = Convert.ToDouble(val.Value.ToString()); break; case "5. volume": v = Convert.ToDouble(val.Value.ToString()); break;
case "6. volume": v = Convert.ToDouble(val.Value.ToString()); break; case "6. volume": v = Convert.ToDouble(val.Value.ToString()); break;
default: o = 0; h = 0; l = 0; c = 0; v = 0; break;
} }
} }
return (date, o, h, l, c, v); return (date, o, h, l, c, v);
+2 -4
View File
@@ -8,16 +8,14 @@ Yahoo Finance - Free API feed to collect daily market quotes
Symbol: stock symbol (default: "IBM") Symbol: stock symbol (default: "IBM")
Period: number of days of collected history (default: 252) Period: number of days of collected history (default: 252)
Usage: Usage:
Yahoo_Feed ticker = new("MSFT", 20); Yahoo_Feed ticker = new("MSFT", 20)
</summary> */ </summary> */
public class Yahoo_Feed : TBars public class Yahoo_Feed : TBars
{ {
private static string requestUrl;
public Yahoo_Feed(string Symbol = "IBM", int Period = 252) { public Yahoo_Feed(string Symbol = "IBM", int Period = 252) {
requestUrl = "https://query1.finance.yahoo.com/v8/finance/chart/"+ string requestUrl = "https://query1.finance.yahoo.com/v8/finance/chart/"+
Symbol+"?interval=1d&period1="+ Symbol+"?interval=1d&period1="+
(int)new DateTimeOffset(DateTime.UtcNow.AddDays(-Period+1)).ToUnixTimeSeconds()+"&period2="+ (int)new DateTimeOffset(DateTime.UtcNow.AddDays(-Period+1)).ToUnixTimeSeconds()+"&period2="+
(int)new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds(); (int)new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();
+3 -3
View File
@@ -71,11 +71,11 @@ public class LINREG_Series : Single_TSeries_Indicator
double _intercept = avgY - (_slope * avgX); double _intercept = avgY - (_slope * avgX);
// calculate Standard Deviation and R-Squared // calculate Standard Deviation and R-Squared
double stdDevX = Math.Sqrt((double)sumSqX / _len); double stdDevX = Math.Sqrt(sumSqX / _len);
double stdDevY = Math.Sqrt((double)sumSqY / _len); double stdDevY = Math.Sqrt(sumSqY / _len);
double _StdDev = stdDevY; double _StdDev = stdDevY;
double arrr = (stdDevX * stdDevY != 0) ? (double)sumSqXY / (stdDevX * stdDevY) / _len : 0; double arrr = (stdDevX * stdDevY != 0) ? sumSqXY / (stdDevX * stdDevY) / _len : 0;
double _RSquared = arrr * arrr; double _RSquared = arrr * arrr;
var ret = (TValue.t, this.Count < this._p - 1 && this._NaN ? double.NaN : _slope); var ret = (TValue.t, this.Count < this._p - 1 && this._NaN ? double.NaN : _slope);
-3
View File
@@ -47,9 +47,6 @@ public class OBV_Series : Single_TBars_Indicator
if (TBar.c > this._lastclose) { _obv += TBar.v; } if (TBar.c > this._lastclose) { _obv += TBar.v; }
if (TBar.c < this._lastclose) { _obv -= TBar.v; } if (TBar.c < this._lastclose) { _obv -= TBar.v; }
// Unclear what the first value in OBV series is - currently set to volume[0]
// if (this.Count == 0) { _obv = 0; }
this._lastlastobv = this._lastobv; this._lastlastobv = this._lastobv;
this._lastobv = _obv; this._lastobv = _obv;
+113 -29
View File
@@ -7,10 +7,10 @@ using Python.Included;
namespace Validations; namespace Validations;
public class PandasTA : IDisposable public class PandasTA : IDisposable
{ {
private GBM_Feed bars; private readonly GBM_Feed bars;
private Random rnd = new(); private readonly Random rnd = new();
private int period; private readonly int period;
private string OStype; private readonly string OStype;
private dynamic np; private dynamic np;
private dynamic ta; private dynamic ta;
private dynamic df; private dynamic df;
@@ -23,14 +23,19 @@ public class PandasTA : IDisposable
// Checking the host OS and setting PythonDLL accordingly // Checking the host OS and setting PythonDLL accordingly
OStype = Environment.OSVersion.ToString(); OStype = Environment.OSVersion.ToString();
if (OStype == "Unix 13.1.0") if (OStype == "Unix 13.1.0")
OStype = @"/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib"; {
else OStype = Path.GetFullPath(".") + @"\python-3.10.0-embed-amd64\python310.dll"; OStype = @"/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib";
}
else
{
OStype = Path.GetFullPath(".") + @"\python-3.10.0-embed-amd64\python310.dll";
}
Installer.InstallPath = Path.GetFullPath("."); Installer.InstallPath = Path.GetFullPath(".");
Installer.SetupPython().Wait(); Installer.SetupPython().Wait();
Installer.TryInstallPip(); Installer.TryInstallPip();
Installer.PipInstallModule("pandas-ta"); Installer.PipInstallModule("pandas-ta");
//Installer.PipInstallModule("git+https://github.com/twopirllc/pandas-ta@development"); //alternative: git+https://github.com/twopirllc/pandas-ta
Runtime.PythonDLL = OStype; Runtime.PythonDLL = OStype;
PythonEngine.Initialize(); PythonEngine.Initialize();
@@ -74,35 +79,98 @@ public class PandasTA : IDisposable
{ {
var pta = df.ta.ohlc4(open: df.open, high: df.high, low: df.low, close: df.close); var pta = df.ta.ohlc4(open: df.open, high: df.high, low: df.low, close: df.close);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(bars.OHLC4.Last().v, 7)); Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(bars.OHLC4.Last().v, 7));
} }
[Fact] [Fact]
void MEDIAN()
{
MED_Series QL = new(bars.Close, period);
var pta = df.ta.median(close: df.close, length: period);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
}
[Fact]
void VARIANCE()
{
VAR_Series QL = new(bars.Close, period);
var pta = df.ta.variance(close: df.close, length: period, ddof:0);
Assert.Equal(Math.Round((double)pta.tail(1), 5), Math.Round(QL.Last().v, 5));
}
[Fact]
void SVARIANCE()
{
SVAR_Series QL = new(bars.Close, period);
var pta = df.ta.variance(close: df.close, length: period, ddof: 1);
Assert.Equal(Math.Round((double)pta.tail(1), 5), Math.Round(QL.Last().v, 5));
}
[Fact]
void ADL()
{
ADL_Series QL = new(bars);
var pta = df.ta.ad(high: df.high, low: df.low, close:df.close, volume:df.volume);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
}
[Fact]
void ADOSC()
{
ADOSC_Series QL = new(bars);
var pta = df.ta.adosc(high: df.high, low: df.low, close: df.close, volume: df.volume);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
}
[Fact]
void TR()
{
TR_Series QL = new(bars);
var pta = df.ta.true_range(high: df.high, low: df.low, close: df.close);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
}
[Fact]
void ATR()
{
ATR_Series QL = new(bars, period);
var pta = df.ta.atr(high: df.high, low: df.low, close: df.close, length: period);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
}
[Fact]
void RSI()
{
RSI_Series QL = new(bars.Close, period);
var pta = df.ta.rsi(close: df.close, length: period);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
}
[Fact]
void TRIMA()
{
//TODO: return length to variable length (period) when Pandas-TA fixes trima
TRIMA_Series QL = new(bars.Close, 11);
var pta = df.ta.trima(close: df.close, length: 11);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
}
[Fact]
void KAMA() void KAMA()
{ {
KAMA_Series QL = new(bars.Close, period); KAMA_Series QL = new(bars.Close, period);
var pta = df.ta.kama(close: df.close, length: period); var pta = df.ta.kama(close: df.close, length: period);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7)); Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
} }
/* [Fact]
[Fact]
void ALMA()
{
ALMA_Series QL = new(bars.Close, period: period, offset: 0.85, sigma: 6.0, false);
var pta = df.ta.alma(close: df.close, length: period, distribution_offset: 0.85, sigma: 6.0);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
}
*/
[Fact]
void HMA() void HMA()
{ {
HMA_Series QL = new(bars.Close, period, false); HMA_Series QL = new(bars.Close, period, false);
var pta = df.ta.hma(close: df.close, length: period); var pta = df.ta.hma(close: df.close, length: period);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7)); Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
} }
[Fact] [Fact]
void SMA() void SMA()
{ {
SMA_Series QL = new(bars.Close, period, false); SMA_Series QL = new(bars.Close, period, false);
@@ -140,9 +208,25 @@ public class PandasTA : IDisposable
WMA_Series QL = new(bars.Close, period, false); WMA_Series QL = new(bars.Close, period, false);
var pta = df.ta.wma(close: df.close, length: period); var pta = df.ta.wma(close: df.close, length: period);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7)); Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
} }
[Fact] [Fact]
void RMA()
{
RMA_Series QL = new(bars.Close, period, false);
var pta = df.ta.rma(close: df.close, length: period);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
}
[Fact]
void ZLEMA()
{
ZLEMA_Series QL = new(bars.Close, period, false);
var pta = df.ta.zlma(close: df.close, length: period);
Assert.Equal(Math.Round((double)pta.tail(1), 7), Math.Round(QL.Last().v, 7));
}
[Fact]
void DEMA() void DEMA()
{ {
DEMA_Series QL = new(bars.Close, period, false); DEMA_Series QL = new(bars.Close, period, false);
+2 -2
View File
@@ -27,7 +27,7 @@ public class Skender_Stock
}); });
} }
[Fact] [Fact]
public void SMA() public void SMA()
{ {
SMA_Series QL = new(bars.Close, period, false); SMA_Series QL = new(bars.Close, period, false);
@@ -196,7 +196,7 @@ public class Skender_Stock
Assert.Equal(Math.Round((double)SK.Last().Rsi!, 6), Math.Round(QL.Last().v, 6)); Assert.Equal(Math.Round((double)SK.Last().Rsi!, 6), Math.Round(QL.Last().v, 6));
} }
[Fact] [Fact]
public void ALMA() public void ALMA()
{ {
ALMA_Series QL = new(bars.Close, period, useNaN: false); ALMA_Series QL = new(bars.Close, period, useNaN: false);
+10
View File
@@ -102,6 +102,16 @@ public class TA_LIB
Assert.Equal(Math.Round(TALIB[TALIB.Length - outBegIdx - 1], 6, MidpointRounding.AwayFromZero), Math.Round(QL.Last().v, 6, MidpointRounding.AwayFromZero)); Assert.Equal(Math.Round(TALIB[TALIB.Length - outBegIdx - 1], 6, MidpointRounding.AwayFromZero), Math.Round(QL.Last().v, 6, MidpointRounding.AwayFromZero));
} }
[Fact]
public void VAR()
{
VAR_Series QL = new(bars.Close, period, false);
Core.Var(inclose, 0, bars.Count - 1, TALIB, out int outBegIdx, out _, period);
Assert.Equal(Math.Round(TALIB[TALIB.Length - outBegIdx - 1], 5, MidpointRounding.AwayFromZero), Math.Round(QL.Last().v, 5));
}
[Fact] [Fact]
public void MIDPOINT() public void MIDPOINT()
{ {
+149 -149
View File
File diff suppressed because one or more lines are too long
+154 -154
View File
@@ -35,158 +35,158 @@ See [Getting Started](https://github.com/mihakralj/QuanTAlib/blob/main/Docs/gett
⛔= Not implemented (yet) ⛔= Not implemented (yet)
| **BASIC TRANSFORMS** | **QuanTAlib** | **TA-LIB** | **Skender** | | **BASIC TRANSFORMS** | **QuanTAlib** | **TA-LIB** | **Skender** | **Pandas TA** |
|--|:--:|:--:|:--:| |--|:--:|:--:|:--:|:--:|
| ✔️ OC2 - (Open+Close)/2 | `.OC2` || GetBaseQuote | | OC2 - (Open+Close)/2 | `.OC2` || CandlePart.OC2 ||
| ⭐ HL2 - Median Price | `.HL2` | MEDPRICE | GetBaseQuote | | ⭐ HL2 - Median Price | `.HL2` | MEDPRICE | CandlePart.HL2 ||
| ⭐ HLC3 - Typical Price | `.HLC3` | TYPPRICE || | ⭐ HLC3 - Typical Price | `.HLC3` | TYPPRICE | CandlePart.HLC3 ||
| ✔️ OHL3 - (Open+High+Low)/3 | `.OHL3` ||| | OHL3 - (Open+High+Low)/3 | `.OHL3` || CandlePart.OHL3 ||
| ⭐ OHLC4 - Average Price | `.OHLC4` | AVGPRICE | GetBaseQuote | | ⭐ OHLC4 - Average Price | `.OHLC4` | AVGPRICE | CandlePart.OHLC4 ||
| ⭐ HLCC4 - Weighted Price | `.HLCC4` | WCLPRICE || | ⭐ HLCC4 - Weighted Price | `.HLCC4` | WCLPRICE | CandlePart.HLCC4 ||
| ⭐ MIDPOINT - Midpoint value | `MIDPOINT_Series` | MIDPOINT || | ⭐ MIDPOINT - Midpoint value | `MIDPOINT_Series` | MIDPOINT |||
| ⭐ MIDPRICE - Midpoint price | `MIDPRICE_Series` | MIDPRICE || | ⭐ MIDPRICE - Midpoint price | `MIDPRICE_Series` | MIDPRICE |||
| ⭐ MAX - Max value | `MAX_Series` | MAX || | ⭐ MAX - Max value | `MAX_Series` | MAX |||
| ⭐ MIN - Min value | `MIN_Series` | MIN || | ⭐ MIN - Min value | `MIN_Series` | MIN |||
| ⭐ SUM - Summation | `SUM_Series` | SUM || | ⭐ SUM - Summation | `SUM_Series` | SUM |||
| ⭐ ADD - Addition | `ADD_Series` | ADD || | ⭐ ADD - Addition | `ADD_Series` | ADD |||
| ⭐ SUB - Subtraction | `SUB_Series` | SUB || | ⭐ SUB - Subtraction | `SUB_Series` | SUB |||
| ⭐ MUL - Multiplication | `MUL_Series` | MUL || | ⭐ MUL - Multiplication | `MUL_Series` | MUL |||
| ⭐ DIV - Division | `DIV_Series` | DIV || | ⭐ DIV - Division | `DIV_Series` | DIV |||
||||| |||||
| **STATISTICS & NUMERICAL ANALYSIS** | **QuanTAlib** | **TA-LIB** | **Skender** | | **STATISTICS & NUMERICAL ANALYSIS** | **QuanTAlib** | **TA-LIB** | **Skender** | **Pandas TA** |
| ✔️ BIAS - Bias | `BIAS_Series` ||| | BIAS - Bias | `BIAS_Series` ||| bias |
| ⛔ CORREL - Pearson's Correlation Coefficient || CORREL | GetCorrelation | | ⛔ CORREL - Pearson's Correlation Coefficient || CORREL | GetCorrelation ||
| ⛔ COVAR - Covariance ||| GetCorrelation | | ⛔ COVAR - Covariance ||| GetCorrelation ||
| ✔️ ENTP - Entropy | `ENTP_Series` ||| | ENTP - Entropy | `ENTP_Series` ||| entropy |
| ✔️ KURT - Kurtosis | `KURT_Series` ||| | KURT - Kurtosis | `KURT_Series` ||| kurtosis |
| ⭐ LINREG - Linear Regression | `LINREG_Series` || GetSlope | | ⭐ LINREG - Linear Regression | `LINREG_Series` || GetSlope ||
| ⭐ MAD - Mean Absolute Deviation | `MAD_Series` || GetSma | | ⭐ MAD - Mean Absolute Deviation | `MAD_Series` || GetSma | mad |
| ⭐ MAPE - Mean Absolute Percent Error | `MAPE_Series` || GetSma | | ⭐ MAPE - Mean Absolute Percent Error | `MAPE_Series` || GetSma ||
| ✔️ MED - Median value | `MED_Series` ||| | MED - Median value | `MED_Series` ||| median |
| ✔️ MSE - Mean Squared Error | `MSE_Series` || GetSma | | ✔️ MSE - Mean Squared Error | `MSE_Series` || GetSma ||
| ⛔ SKEW - Skewness |||| | ⛔ SKEW - Skewness |||||
| ⭐ SDEV - Standard Deviation (Volatility) | `SDEV_Series` | STDDEV || | ⭐ SDEV - Standard Deviation (Volatility) | `SDEV_Series` | STDDEV |||
| ✔️ SSDEV - Sample Standard Deviation | `SSDEV_Series` ||| | ✔️ SSDEV - Sample Standard Deviation | `SSDEV_Series` ||||
| ✔️ SMAPE - Symmetric Mean Absolute Percent Error | `SMAPE_Series` ||| | ✔️ SMAPE - Symmetric Mean Absolute Percent Error | `SMAPE_Series` ||||
| ✔️ VAR - Population Variance | `VAR_Series` | VAR || | VAR - Population Variance | `VAR_Series` | VAR || variance |
| ✔️ SVAR - Sample Variance | `SVAR_Series` ||| | SVAR - Sample Variance | `SVAR_Series` ||| variance |
| ⛔ QUANT - Quantile |||| | ⛔ QUANT - 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 - Number of standard deviations from mean |||||
||||| ||||||
| **TREND INDICATORS & AVERAGES** | **QuanTAlib** | **TA-LIB** | **Skender** | | **TREND INDICATORS & AVERAGES** | **QuanTAlib** | **TA-LIB** | **Skender** | **Pandas TA** |
| ⛔ AFIRMA - Autoregressive Finite Impulse Response Moving Average |||| | ⛔ AFIRMA - Autoregressive Finite Impulse Response Moving Average |||||
| ⭐ ALMA - Arnaud Legoux Moving Average | `ALMA_Series` || GetAlma | | ⭐ ALMA - Arnaud Legoux Moving Average | `ALMA_Series` || GetAlma ||
| ⛔ ARIMA - Autoregressive Integrated Moving Average |||| | ⛔ ARIMA - Autoregressive Integrated Moving Average |||||
| ⭐ DEMA - Double EMA Average | `DEMA_Series` | DEMA | GetDema | | ⭐ DEMA - Double EMA Average | `DEMA_Series` | DEMA | GetDema | dema |
| ⭐ EMA - Exponential Moving Average | `EMA_Series` || GetEma | | ⭐ EMA - Exponential Moving Average | `EMA_Series` || GetEma | 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 - Fibonacci's Weighted Moving Average |||||
| ⛔ HILO - Gann High-Low Activator |||| | ⛔ HILO - Gann High-Low Activator |||||
| ✔️ 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 - Hull Moving Average | `HMA_Series` || GetHma | hma |
| ⛔ HWMA - Holt-Winter Moving Average |||| | ⛔ HWMA - Holt-Winter Moving Average |||||
| ✔️ JMA - Jurik Moving Average | `JMA_Series` ||| | ✔️ JMA - Jurik Moving Average | `JMA_Series` ||||
| ⭐ KAMA - Kaufman's Adaptive Moving Average | `KAMA_Series` | KAMA | GetKama | | ⭐ KAMA - Kaufman's Adaptive Moving Average | `KAMA_Series` | KAMA | GetKama | kama |
| ⛔ KDJ - KDJ Indicator (trend reversal) |||| | ⛔ KDJ - KDJ Indicator (trend reversal) |||||
| ⛔ LSMA - Least Squares Moving Average |||| | ⛔ LSMA - Least Squares Moving Average |||||
| ⭐ MACD - Moving Average Convergence/Divergence | `MACD_Series` | MACD | GetMacd | | ⭐ MACD - Moving Average Convergence/Divergence | `MACD_Series` | MACD | GetMacd ||
| ⛔ MAMA - MESA Adaptive Moving Average || MAMA | GetMama | | ⛔ MAMA - MESA Adaptive Moving Average || MAMA | GetMama ||
| ⛔ MCGD - McGinley Dynamic |||| | ⛔ MCGD - McGinley Dynamic |||||
| ⛔ 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 - Pascal's Weighted Moving Average |||||
| ✔️ RMA - WildeR's Moving Average | `RMA_Series` ||| | RMA - WildeR's Moving Average | `RMA_Series` ||| rma |
| ⛔ SINWMA - Sine Weighted Moving Average |||| | ⛔ SINWMA - Sine Weighted Moving Average |||||
| ⭐ SMA - Simple Moving Average | `SMA_Series` | SMA | GetSma | | ⭐ SMA - Simple Moving Average | `SMA_Series` | SMA | GetSma | sma |
| ⭐ SMMA - Smoothed Moving Average | `SMMA_Series` ||| | ⭐ SMMA - Smoothed Moving Average | `SMMA_Series` || GetSmma ||
| ⛔ SSF - Ehler's Super Smoother Filter |||| | ⛔ SSF - Ehler's Super Smoother Filter |||||
| ⛔ SUP - Supertrend |||| | ⛔ SUP - Supertrend |||||
| ⛔ SWMA - Symmetric Weighted Moving Average |||| | ⛔ SWMA - Symmetric Weighted Moving Average |||||
| ⛔ T3 - Tillson T3 Moving Average || T3 | GetT3 | | ⛔ T3 - Tillson T3 Moving Average || T3 | GetT3 ||
| ⭐ TEMA - Triple EMA Average | `TEMA_Series` | TEMA | GetTema | | ⭐ TEMA - Triple EMA Average | `TEMA_Series` | TEMA | GetTema | tema |
| ⭐ TRIMA - Triangular Moving Average | `TRIMA_Series` | TRIMA || | ⭐ TRIMA - Triangular Moving Average | `TRIMA_Series` | TRIMA |||
| ⛔ TSF - Time Series Forecast || TSF || | ⛔ TSF - Time Series Forecast || TSF |||
| ⛔ VIDYA - Variable Index Dynamic Average |||| | ⛔ VIDYA - Variable Index Dynamic Average |||||
| ⛔ VOR - Vortex Indicator |||| | ⛔ VOR - Vortex Indicator |||||
| ⭐ WMA - Weighted Moving Average | `WMA_Series` | WMA | GetWma | | ⭐ WMA - Weighted Moving Average | `WMA_Series` | WMA | GetWma | wma |
| ✔️ ZLEMA - Zero Lag EMA Average | `ZLEMA_Series` ||| | ZLEMA - Zero Lag EMA Average | `ZLEMA_Series` ||| zlma |
||||| ||||||
| **VOLATILITY INDICATORS** | **QuanTAlib** | **TA-LIB** | **Skender** | | **VOLATILITY INDICATORS** | **QuanTAlib** | **TA-LIB** | **Skender** | **Pandas TA** |
| ⭐ ADL - Chaikin Accumulation Distribution Line | `ADL_Series` | AD | GetAdl | | ⭐ ADL - Chaikin Accumulation Distribution Line | `ADL_Series` | AD | GetAdl | ad |
| ⭐ ADOSC - Chaikin Accumulation Distribution Oscillator | `ADOSC_Series` | ADOSC| GetAdl | | ⭐ ADOSC - Chaikin Accumulation Distribution Oscillator | `ADOSC_Series` | ADOSC| GetAdl | adosc |
| ⭐ ATR - Average True Range | `ATR_Series` | ATR | GetAtr | | ⭐ ATR - Average True Range | `ATR_Series` | ATR | GetAtr | 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 - Bollinger Bands® | `BBANDS_Series` | BBANDS | GetBollingerBands ||
| ⛔ CHAND - Chandelier Exit ||| GetChandelier | | ⛔ CHAND - Chandelier Exit ||| GetChandelier ||
| ⛔ CRSI - Connor RSI ||| GetConnorsRsi | | ⛔ CRSI - Connor RSI ||| GetConnorsRsi ||
| ⛔ DON - Donchian Channels ||| GetDonchian | | ⛔ DON - Donchian Channels ||| GetDonchian ||
| ⛔ FCB - Fractal Chaos Bands ||| GetFcb | | ⛔ FCB - Fractal Chaos Bands ||| GetFcb ||
| ⛔ 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 - Relative Strength Index | `RSI_Series` | RSI | GetRsi | 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 | | ⭐ TR - True Range | `TR_Series` | TRANGE | GetTr | true_range |
| ⛔ UI - Ulcer Index |||| | ⛔ UI - Ulcer Index |||||
| ⛔ VSTOP - Volatility Stop |||| | ⛔ VSTOP - Volatility Stop |||||
||||| ||||||
| **MOMENTUM INDICATORS & OSCILLATORS** | **QuanTAlib** | **TA-LIB** | **Skender** | | **MOMENTUM INDICATORS & OSCILLATORS** | **QuanTAlib** | **TA-LIB** | **Skender** | **Pandas TA** |
| ⛔ AC - Acceleration Oscillator |||| | ⛔ AC - Acceleration Oscillator |||||
| ⛔ ADX - Average Directional Movement Index || ADX | GetAdx | | ⛔ ADX - Average Directional Movement Index || ADX | GetAdx ||
| ⛔ ADXR - Average Directional Movement Index Rating || ADXR | GetAdx | | ⛔ ADXR - Average Directional Movement Index Rating || ADXR | GetAdx ||
| ⛔ AO - Awesome Oscillator ||| GetAwesome | | ⛔ AO - Awesome Oscillator ||| GetAwesome ||
| ⛔ APO - Absolute Price Oscillator || APO || | ⛔ APO - Absolute Price Oscillator || APO |||
| ⛔ AROON - Aroon oscillator || AROON | GetAroon | | ⛔ AROON - Aroon oscillator || AROON | GetAroon ||
| ⛔ BOP - Balance of Power || BOP | GetBop | | ⛔ BOP - Balance of Power || BOP | GetBop ||
| ⭐ CCI - Commodity Channel Index | `CCI_Series` | CCI | GetCci | | ⭐ CCI - Commodity Channel Index | `CCI_Series` | CCI | GetCci ||
| ⛔ CFO - Chande Forcast Oscillator |||| | ⛔ CFO - Chande Forcast Oscillator |||||
| ⛔ CMO - Chande Momentum Oscillator || CMO | GetCmo | | ⛔ CMO - Chande Momentum Oscillator || CMO | GetCmo ||
| ⛔ 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 ||
| ⛔ 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 | GetTrix | | ⛔ TRIX - 1-day ROC of TEMA || TRIX | GetTrix ||
| ⛔ TSI - True Strength Index |||| | ⛔ TSI - True Strength Index |||||
| ⛔ UO - Ultimate Oscillator || ULTOSC | GetUltimate | | ⛔ UO - Ultimate Oscillator || ULTOSC | GetUltimate ||
| ⛔ WILLR - Larry Williams' %R || WILLR | GetWilliamsR | | ⛔ WILLR - Larry Williams' %R || WILLR | GetWilliamsR ||
| ⛔ WGAT - Williams Alligator |||| | ⛔ WGAT - Williams Alligator |||||
||||| ||||||
| **VOLUME INDICATORS** | **QuanTAlib** | **TA-LIB** | **Skender** | | **VOLUME INDICATORS** | **QuanTAlib** | **TA-LIB** | **Skender** | **Pandas TA** |
| ⛔ AOBV - Archer On-Balance Volume |||| | ⛔ AOBV - Archer On-Balance Volume |||||
| ⛔ CMF - Chaikin Money Flow |||| | ⛔ CMF - Chaikin Money Flow |||||
| ⛔ EOM - Ease of Movement |||| | ⛔ EOM - Ease of Movement |||||
| ⭐ OBV - On-Balance Volume | ` OBV_Series` | OBV | GetObv | | ⭐ OBV - On-Balance Volume | `OBV_Series` | OBV | GetObv ||
| ⛔ 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 |||||