Merge branch 'dev' into main

This commit is contained in:
Miha Kralj
2022-12-24 19:10:18 -08:00
8 changed files with 585 additions and 274 deletions
+8 -8
View File
@@ -80,14 +80,14 @@ jobs:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coveragereport.xml
# - name: Release
# uses: marvinpinto/action-automatic-releases@latest
# with:
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
# automatic_release_tag: "latest"
# prerelease: true
# title: "Latest Build"
# files: /Quantower/Settings/Scripts/Indicators/QuanTAlib/*.dll
- name: Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Latest Build"
files: /Quantower/Settings/Scripts/Indicators/QuanTAlib/*.dll
- name: Authenticate to Github packages source
run: dotnet nuget add source
+3 -15
View File
@@ -30,6 +30,7 @@ public class DEMA_Series : Single_TSeries_Indicator
{
_k = 2.0 / (_p + 1);
_useSMA = useSMA;
_lastema1 = _lastema2 =0;
if (_data.Count > 0) { base.Add(_data); }
}
@@ -48,22 +49,9 @@ public class DEMA_Series : Single_TSeries_Indicator
_ema1 = 0;
for (int i=0; i<_buffer1.Count; i++) { _ema1 += _buffer1[i]; }
_ema1 /= _buffer1.Count;
Add_Replace_Trim(_buffer2, _ema1, _p, update);
_ema2 = 0;
for (int i = 0; i < _buffer2.Count; i++) { _ema2 += _buffer2[i]; }
_ema2 /= _buffer2.Count;
_ema2 = _ema1;
}
else if(this.Count < (2*_p - 1) && _useSMA) // second _p
{
_ema1 = (TValue.v - _lastema1) * _k + _lastema1;
Add_Replace_Trim(_buffer2, _ema1, _p, update);
_ema2 = 0;
for (int i = 0; i < _buffer2.Count; i++) { _ema2 += _buffer2[i]; }
_ema2 /= _buffer2.Count;
}
else // all others
else
{
_ema1 = (TValue.v - _lastema1) * _k + _lastema1;
_ema2 = (_ema1 - _lastema2) * _k + _lastema2;
+3 -1
View File
@@ -9,6 +9,8 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Python.Included" Version="3.11.1" />
<PackageReference Include="pythonnet" Version="3.0.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -16,7 +18,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221221-03" />
<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.6" />
<PackageReference Include="Tulip.NETCore" Version="0.8.0.1" />
<PackageReference Include="System.Text.Json" Version="7.0.1" />
</ItemGroup>
+23 -3
View File
@@ -1,4 +1,8 @@
<<<<<<< HEAD
/*
=======
>>>>>>> dev
using Xunit;
using System;
using QuanTAlib;
@@ -20,7 +24,7 @@ public class PandasTA : IDisposable
public PandasTA() {
bars = new(Bars: 5000, Volatility: 0.8, Drift: 0.0);
period = rnd.Next(maxValue: 28) + 3;
sample = 200;
sample = period+1;
digits = 10;
// Checking the host OS and setting PythonDLL accordingly
@@ -186,7 +190,20 @@ public class PandasTA : IDisposable
double PanTA_item = Math.Round((double)pta[i - 1], digits: digits);
Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
}
[Fact]
void MACD() {
MACD_Series QL = new(bars.Close, 26,fast: 12,signal:9);
var pta = df.ta.macd(close: df.close).to_numpy();
for (int i = QL.Length; i > QL.Length - sample; i--) {
double QL_item = QL[i - 1].v;
double PanTA_item = (double)pta[i - 1][0];
Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
QL_item = QL.Signal[i - 1].v;
PanTA_item = (double)pta[i - 1][2];
Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact] void MAD()
{
MAD_Series QL = new(bars.Close, period, useNaN: false);
@@ -380,4 +397,7 @@ public class PandasTA : IDisposable
}
}
*/
<<<<<<< HEAD
*/
=======
>>>>>>> dev
+27 -22
View File
@@ -17,7 +17,7 @@ public class Skender
bars = new(Bars: 10000, Volatility: 0.5, Drift: 0.0, Precision: 2);
period = rnd.Next(30) + 5;
digits = 5; //minimizing rounding errors in type conversions
skip = 300;
skip = period+2;
quotes = bars.Select(q => new Quote
{
@@ -156,7 +156,7 @@ public class Skender
[Fact]
public void DEMA()
{
DEMA_Series QL = new(bars.Close, period, false);
DEMA_Series QL = new(bars.Close, period, false, useSMA: true);
var SK = quotes.GetDema(period).Select(i => i.Dema.Null2NaN()!);
for (int i = QL.Length; i > skip; i--)
{
@@ -213,20 +213,19 @@ public class Skender
Assert.InRange(SK_item! - QL_item, -Math.Pow(10, -digits), Math.Pow(10, -digits));
}
}
/*
[Fact]
public void KAMA()
{
// TODO: check precision of KAMA()
KAMA_Series QL = new(bars.Close, period, useNaN: false);
var SK = quotes.GetKama(period).Select(i => i.Kama.Null2NaN()!);
for (int i = QL.Length; i > skip; i--)
for (int i = QL.Length; i > 250; i--)
{
double QL_item = QL[i - 1].v;
double SK_item = SK.ElementAt(i - 1);
Assert.InRange(SK_item! - QL_item, -Math.Pow(10,-digits), Math.Pow(10,-digits));
}
} */
}
[Fact]
public void LINREG()
{
@@ -253,14 +252,14 @@ public class Skender
{
MACD_Series QL = new(bars.Close, 26, 12, 9, useNaN: false);
var SK = quotes.GetMacd(12, 26, 9);
for (int i = QL.Length; i > skip; i--)
for (int i = QL.Length; i > 27; i--)
{
double QL_item = Math.Round(QL[i - 1].v, digits: digits);
double SK_item = Math.Round(SK.ElementAt(i - 1).Macd.Null2NaN()!, digits: digits);
Assert.InRange(SK_item! - QL_item, -Math.Pow(10,-digits), Math.Pow(10,-digits));
QL_item = Math.Round(QL.Signal[i - 1].v, digits: digits);
SK_item = Math.Round(SK.ElementAt(i - 1).Signal.Null2NaN()!, digits: digits);
double QL_item = QL[i - 1].v;
double SK_item = SK.ElementAt(i - 1).Macd.Null2NaN()!;
Assert.InRange(SK_item! - QL_item, -Math.Pow(10,-digits), Math.Pow(10,-digits));
//QL_item = QL.Signal[i - 1].v;
//SK_item = SK.ElementAt(i - 1).Signal.Null2NaN()!;
//Assert.InRange(SK_item! - QL_item, -Math.Pow(10,-digits), Math.Pow(10,-digits));
}
}
[Fact]
@@ -319,11 +318,10 @@ public class Skender
{
OBV_Series QL = new(bars, period, false);
var SK = quotes.GetObv(period).Select(i => i.Obv!);
// adding volume[0] to OBV to pass the test and keep compatibility with TA-LIB
for (int i = QL.Length; i > skip; i--)
{
for (int i = QL.Length; i > skip; i--) {
double QL_item = Math.Round(QL.Last().v, digits: digits);
double SK_item = Math.Round(SK.Last()! + (double)quotes.First().Volume!, digits: digits);
// adding volume[0] to OBV to pass the test and keep compatibility with TA-LIB
double SK_item = Math.Round(SK.Last()! + (double)quotes.First().Volume!, digits: digits);
Assert.InRange(SK_item! - QL_item, -Math.Pow(10,-digits), Math.Pow(10,-digits));
}
}
@@ -411,8 +409,7 @@ public class Skender
Assert.InRange(SK_item! - QL_item, -Math.Pow(10,-digits), Math.Pow(10,-digits));
}
}
/*
[Fact]
[Fact]
public void T3()
{
T3_Series QL = new(source: bars.Close, period: period, vfactor: 0.7, false);
@@ -423,8 +420,18 @@ public class Skender
double SK_item = Math.Round(SK.ElementAt(i - 1), digits: digits);
Assert.InRange(SK_item! - QL_item, -Math.Pow(10,-digits), Math.Pow(10,-digits));
}
}*/
[Fact]
}
[Fact]
public void TRIX() {
TRIX_Series QL = new(bars.Close, period, false);
var SK = quotes.GetTrix(period).Select(i => i.Trix.Null2NaN()!);
for (int i = QL.Length; i > skip; i--) {
double QL_item = Math.Round(QL[i - 1].v, digits: digits);
double SK_item = Math.Round(SK.ElementAt(i - 1), digits: digits);
Assert.InRange(SK_item! - QL_item, -Math.Pow(10, -digits), Math.Pow(10, -digits));
}
}
[Fact]
public void TEMA()
{
TEMA_Series QL = new(bars.Close, period, false);
@@ -448,7 +455,6 @@ public class Skender
Assert.InRange(SK_item! - QL_item, -Math.Pow(10,-digits), Math.Pow(10,-digits));
}
}
/*
[Fact]
public void WMA()
{
@@ -461,8 +467,7 @@ public class Skender
Assert.InRange(SK_item! - QL_item, -Math.Pow(10,-digits), Math.Pow(10,-digits));
}
}
*/
[Fact]
[Fact]
public void ZSCORE()
{
ZSCORE_Series QL = new(bars.Close, period, useNaN: false);
+33 -29
View File
@@ -21,7 +21,7 @@ public class Ta_Lib
{
bars = new(Bars: 5000, Volatility: 0.8, Drift: 0.0, Precision: 3);
period = rnd.Next(28) + 3;
skip = 500;
skip = period+2;
digits = 10;
TALIB = new double[bars.Count];
@@ -81,32 +81,27 @@ public class Ta_Lib
Assert.InRange(TA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
/*
[Fact]
public void BBANDS()
{
double[] outMiddle = new double[bars.Count];
double[] outUpper = new double[bars.Count];
double[] outLower = new double[bars.Count];
BBANDS_Series QL = new(bars.Close, period: 26, multiplier: 2.0, false);
Core.Bbands(inclose, 0, bars.Count - 1, outRealUpperBand: outUpper, outRealMiddleBand: outMiddle, outRealLowerBand: outLower, out int outBegIdx, out _, optInTimePeriod: 26, optInNbDevUp: 2.0, optInNbDevDn: 2.0);
BBANDS_Series QL = new(bars.Close, period: period, multiplier: 2.0, false);
Core.Bbands(inclose, 0, bars.Count - 1, outRealUpperBand: outUpper, outRealMiddleBand: outMiddle, outRealLowerBand: outLower, out int outBegIdx, out _, optInTimePeriod: period, optInNbDevUp: 2.0, optInNbDevDn: 2.0);
for (int i = QL.Length - 1; i > skip; i--)
{
double QL_item = Math.Round(QL.Upper[i].v, digits: digits);
double TA_item = Math.Round(outUpper[i - outBegIdx], digits: digits);
Assert.Equal(TA_item!, QL_item);
QL_item = Math.Round(QL.Mid[i].v, digits: digits);
TA_item = Math.Round(outMiddle[i - outBegIdx], digits: digits);
Assert.Equal(TA_item!, QL_item);
QL_item = Math.Round(QL.Lower[i].v, digits: digits);
TA_item = Math.Round(outLower[i - outBegIdx], digits: digits);
Assert.Equal(TA_item!, QL_item);
double QL_item = QL.Upper[i].v;
double TA_item = outUpper[i - outBegIdx];
Assert.InRange(TA_item! - QL_item, -Math.Exp(-digits), high: Math.Exp(-digits));
QL_item = QL.Mid[i].v;
TA_item = outMiddle[i - outBegIdx];
Assert.InRange(TA_item! - QL_item, -Math.Exp(-digits), high: Math.Exp(-digits));
QL_item = QL.Lower[i].v;
TA_item = outLower[i - outBegIdx];
Assert.InRange(TA_item! - QL_item, -Math.Exp(-digits), high: Math.Exp(-digits));
}
Assert.Equal(Math.Round(outUpper[outUpper.Length - outBegIdx - 1], digits: digits), Math.Round(QL.Upper.Last().v, digits: digits));
Assert.Equal(Math.Round(outMiddle[outMiddle.Length - outBegIdx - 1], digits: digits), Math.Round(QL.Mid.Last().v, digits: digits));
Assert.Equal(Math.Round(outLower[outLower.Length - outBegIdx - 1], digits: digits), Math.Round(QL.Lower.Last().v, digits: digits));
}
*/
[Fact]
public void CCI()
{
@@ -119,7 +114,6 @@ public class Ta_Lib
Assert.InRange(TA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
/*
[Fact]
public void CMO() {
CMO_Series QL = new(bars.Close, period, false);
@@ -130,7 +124,6 @@ public class Ta_Lib
Assert.InRange(TA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
*/
[Fact]
public void CORR()
{
@@ -146,9 +139,9 @@ public class Ta_Lib
[Fact]
public void DEMA()
{
DEMA_Series QL = new(bars.Close, period, false);
DEMA_Series QL = new(bars.Close, period, false, useSMA: false);
Core.Dema(inclose, 0, bars.Count - 1, TALIB, out int outBegIdx, out _, period);
for (int i = QL.Length - 1; i > skip; i--)
for (int i = QL.Length - 1; i > skip*2; i--)
{
double QL_item = Math.Round(QL[i].v, digits: digits);
double TA_item = Math.Round(TALIB[i - outBegIdx], digits: digits);
@@ -215,20 +208,31 @@ public class Ta_Lib
Assert.InRange(TA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
[Fact]
public void KAMA() {
KAMA_Series QL = new(bars.Close, period, fast: 2, slow: 30);
Core.Kama(inReal: inclose, startIdx: 0, endIdx: bars.Count - 1, outReal: TALIB, outBegIdx: out int outBegIdx, outNbElement: out _, optInTimePeriod: period);
for (int i = QL.Length - 1; i > skip * 15; i--) {
double QL_item = QL[i].v;
double TA_item = TALIB[i - outBegIdx];
Assert.InRange(TA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void MACD()
{
double[] macdSignal = new double[bars.Count];
double[] macdHist = new double[bars.Count];
MACD_Series QL = new(bars.Close, slow: 26, fast: 12, signal: 9, false);
Core.Macd(inclose, 0, bars.Count - 1, outMacd: TALIB, outMacdSignal: macdSignal, outMacdHist: macdHist, out int outBegIdx, out _);
for (int i = QL.Length - 1; i > skip * 10; i--)
// TA-LIB runs EMA without SMA, leaving first 100 values for convergence
Core.Macd(inclose, 0, bars.Count - 1, outMacd: TALIB, outMacdSignal: macdSignal, outMacdHist: macdHist, out int outBegIdx, out _, optInFastPeriod: 12, optInSlowPeriod: 26, optInSignalPeriod: 9);
for (int i = QL.Length - 1; i > 100; i--)
{
double QL_item = Math.Round(QL[i].v, digits: digits);
double TA_item = Math.Round(TALIB[i - outBegIdx], digits: digits);
Assert.Equal(TA_item!, QL_item);
QL_item = Math.Round(QL.Signal[i].v, digits: digits);
TA_item = Math.Round(macdSignal[i - outBegIdx], digits: digits);
double QL_item = QL[i].v;
double TA_item = TALIB[i - outBegIdx];
Assert.InRange(TA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
QL_item = QL.Signal[i].v;
TA_item = macdSignal[i - outBegIdx];
Assert.InRange(TA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
+332 -40
View File
@@ -20,7 +20,7 @@ public class Tulip_Test
{
bars = new(Bars: 5000, Volatility: 0.8, Drift: 0.0, Precision: 3);
period = rnd.Next(28) + 3;
skip = 200;
skip = period+1;
digits = 10;
outdata = new double[bars.Count];
@@ -40,8 +40,8 @@ public class Tulip_Test
Tulip.Indicators.ad.Run(inputs: arrin, options: new double[] { }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--)
{
double QL_item = Math.Round(QL[i].v, digits: digits);
double TU_item = Math.Round(arrout[0][i], digits);
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
@@ -54,8 +54,8 @@ public class Tulip_Test
Tulip.Indicators.add.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--)
{
double QL_item = Math.Round(QL[i].v, digits: digits);
double TU_item = Math.Round(arrout[0][i], digits);
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
@@ -69,8 +69,8 @@ public class Tulip_Test
Tulip.Indicators.adosc.Run(inputs: arrin, options: new double[] { s, period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--)
{
double QL_item = Math.Round(QL[i].v, digits: digits);
double TU_item = Math.Round(arrout[0][i-period+1], digits);
double QL_item = QL[i].v;
double TU_item = arrout[0][i-period+1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
@@ -84,8 +84,8 @@ public class Tulip_Test
Tulip.Indicators.atr.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--)
{
double QL_item = Math.Round(QL[i].v, digits: digits);
double TU_item = Math.Round(arrout[0][i - period + 1], digits);
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
@@ -101,47 +101,220 @@ public class Tulip_Test
Tulip.Indicators.bbands.Run(inputs: arrin, options: new double[] { period, 2 }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--)
{
double QL_item = Math.Round(QL.Lower[i].v, digits: digits);
double TU_item = Math.Round(outlower[i - period + 1], digits);
double QL_item = QL.Lower[i].v;
double TU_item = outlower[i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
QL_item = Math.Round(QL.Mid[i].v, digits: digits);
TU_item = Math.Round(outmid[i - period + 1], digits);
QL_item = QL.Mid[i].v;
TU_item = outmid[i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
QL_item = Math.Round(QL.Upper[i].v, digits: digits);
TU_item = Math.Round(outupper[i - period + 1], digits);
QL_item = QL.Upper[i].v;
TU_item = outupper[i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void CCI() {
double[][] arrin = { inopen, inhigh, inlow, inclose, involume };
double[][] arrout = { outdata };
CCI_Series QL = new(bars, period, useNaN: false);
Tulip.Indicators.cci.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period-1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void CMO() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
CMO_Series QL = new(bars.Close, period, useNaN: false);
Tulip.Indicators.cmo.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
/*
[Fact]
public void DEMA() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
DEMA_Series QL = new(bars.Close, period, useNaN: false, useSMA: false);
Tulip.Indicators.dema.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = Math.Round(QL[i].v, digits: digits);
double TU_item = Math.Round(arrout[0][i-(period+period-2)], digits);
for (int i = QL.Length - 1; i > skip*2; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i-(period+period-2)];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void DIV() {
double[][] arrin = { inhigh, inlow };
double[][] arrout = { outdata };
DIV_Series QL = new(bars.High, bars.Low);
Tulip.Indicators.div.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
*/
[Fact]
public void EMA()
{
double[][] arrin = { inclose };
double[][] arrout = { outdata };
EMA_Series QL = new(bars.Close, period, false);
// Tulip EMA doesn't use SMA to warm-up
EMA_Series QL = new(bars.Close, period, false, useSMA: false);
Tulip.Indicators.ema.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--)
{
double QL_item = Math.Round(QL[i].v, digits: digits);
double TU_item = Math.Round(arrout[0][i], digits);
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void AVGPRICE()
public void HL2() {
double[][] arrin = { inhigh, inlow };
double[][] arrout = { outdata };
TSeries QL = bars.HL2;
Tulip.Indicators.medprice.Run(inputs: arrin, options: new double[] { }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void HLC3() {
double[][] arrin = { inhigh, inlow, inclose };
double[][] arrout = { outdata };
TSeries QL = bars.HLC3;
Tulip.Indicators.typprice.Run(inputs: arrin, options: new double[] { }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void HLCC4() {
double[][] arrin = { inhigh, inlow, inclose };
double[][] arrout = { outdata };
TSeries QL = bars.HLCC4;
Tulip.Indicators.wcprice.Run(inputs: arrin, options: new double[] { }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void HMA() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
HMA_Series QL = new(bars.Close, period, false);
Tulip.Indicators.hma.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period - 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void KAMA() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
KAMA_Series QL = new(bars.Close, period);
Tulip.Indicators.kama.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > 250; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void LINREG() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
LINREG_Series QL = new(bars.Close, period);
Tulip.Indicators.linregslope.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period+1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void MACD() {
double[] outsignal = new double[bars.Count];
double[] outhist = new double[bars.Count];
double[][] arrin = { inclose };
double[][] arrout = { outdata, outsignal, outhist };
MACD_Series QL = new(bars.Close, slow: 26,fast: 10, signal: 9);
Tulip.Indicators.macd.Run(inputs: arrin, options: new double[] { 10,26,9 }, outputs: arrout);
for (int i = QL.Length - 1; i > 150; i--) {
double QL_item = QL[i].v;
double TU_item =outdata[i - 26+1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void MAX() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
MAX_Series QL = new(bars.Close, period, false);
Tulip.Indicators.max.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i-period+1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void MIN() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
MIN_Series QL = new(bars.Close, period, false);
Tulip.Indicators.min.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void MUL() {
double[][] arrin = { inhigh, inlow };
double[][] arrout = { outdata };
MUL_Series QL = new(bars.High, bars.Low);
Tulip.Indicators.mul.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void OBV() {
double[][] arrin = { inclose, involume };
double[][] arrout = { outdata };
OBV_Series QL = new(bars, period, false);
Tulip.Indicators.obv.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void OHLC4()
{
double[][] arrin = { inopen, inhigh, inlow, inclose };
double[][] arrout = { outdata };
@@ -150,8 +323,32 @@ public class Tulip_Test
Tulip.Indicators.avgprice.Run(inputs: arrin, options: new double[] { }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--)
{
double QL_item = Math.Round(QL[i].v, digits: digits);
double TU_item = Math.Round(arrout[0][i], digits);
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void RMA() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
RMA_Series QL = new(bars.Close, period, false);
Tulip.Indicators.wilders.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void RSI() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
RSI_Series QL = new(bars.Close, period, false);
Tulip.Indicators.rsi.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
@@ -164,33 +361,128 @@ public class Tulip_Test
Tulip.Indicators.sma.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--)
{
double QL_item = Math.Round(QL[i].v, digits: digits);
double TU_item = Math.Round(arrout[0][i-period+1], digits);
double QL_item = QL[i].v;
double TU_item = arrout[0][i-period+1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
/*
[Fact]
public void HMA() {
public void SDEV() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
HMA_Series QL = new(bars.Close, period, false);
Tulip.Indicators.hma.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
SDEV_Series QL = new(bars.Close, period, false);
Tulip.Indicators.stddev.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = Math.Round(QL[i].v, digits: digits);
double TU_item = Math.Round(arrout[0][i-period-1], digits);
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}*/
}
[Fact]
public void CMO() {
public void SUB() {
double[][] arrin = { inhigh, inlow };
double[][] arrout = { outdata };
SUB_Series QL = new(bars.High, bars.Low);
Tulip.Indicators.sub.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void SUM() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
CMO_Series QL = new(bars.Close, period, useNaN: false);
Tulip.Indicators.cmo.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
SUM_Series QL = new(bars.Close, period, false);
Tulip.Indicators.sum.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = Math.Round(QL[i].v, digits: digits);
double TU_item = Math.Round(arrout[0][i-period], digits);
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void TR() {
double[][] arrin = { inhigh,inlow,inclose };
double[][] arrout = { outdata };
TR_Series QL = new(bars, false);
Tulip.Indicators.tr.Run(inputs: arrin, options: new double[] {}, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void TEMA() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
TEMA_Series QL = new(bars.Close, period, false);
Tulip.Indicators.tema.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void TRIMA() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
TRIMA_Series QL = new(bars.Close, period, false);
Tulip.Indicators.trima.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void TRIX() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
TRIX_Series QL = new(bars.Close, period, false);
Tulip.Indicators.trix.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period +1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void VAR() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
VAR_Series QL = new(bars.Close, period, false);
Tulip.Indicators.var.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void WMA() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
WMA_Series QL = new(bars.Close, period, false);
Tulip.Indicators.wma.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact]
public void ZLEMA() {
double[][] arrin = { inclose };
double[][] arrout = { outdata };
ZLEMA_Series QL = new(bars.Close, period, false);
Tulip.Indicators.zlema.Run(inputs: arrin, options: new double[] { period }, outputs: arrout);
for (int i = QL.Length - 1; i > skip; i--) {
double QL_item = QL[i].v;
double TU_item = arrout[0][i - period + 1];
Assert.InRange(TU_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
+156 -156
View File
@@ -4,171 +4,171 @@
✔️= 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 ||
| HL2 - Median Price | `.HL2` | MEDPRICE | CandlePart.HL2 | hl2 |
| HLC3 - Typical Price | `.HLC3` | TYPPRICE | CandlePart.HLC3 | hlc3 |
| OHL3 - (Open+High+Low)/3 | `.OHL3` || CandlePart.OHL3 ||
| 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 |
|OC2 - (Open+Close)/2| `.OC2`||✔️CandlePart.OC2||
|HL2 - Median Price|`.HL2`|✔️MEDPRICE|✔️CandlePart.HL2|✔️hl2|✔️medprice|
|HLC3 - Typical Price|`.HLC3`|✔️TYPPRICE|✔️CandlePart.HLC3|✔️hlc3|✔️typprice|
|OHL3 - (Open+High+Low)/3|`.OHL3`||✔️CandlePart.OHL3||
|OHLC4 - Average Price|`.OHLC4`|✔️AVGPRICE|✔️CandlePart.OHLC4|✔️ohlc4|✔️avgprice|
|HLCC4 - Weighted Price|`.HLCC4`|✔️WCLPRICE|||✔️wcprice|
|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** |
|**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 |
|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||✔️linregslope|
|MAD - Mean Absolute Deviation|`MAD_Series`||✔️GetSmaAnalysis|✔️mad|
|MAPE - Mean Absolute Percent Error|`MAPE_Series`||✔️GetSmaAnalysis||
|MEDIAN - Median value|`MEDIAN_Series`|||✔️median|
|MSE - Mean Squared Error|`MSE_Series`||✔️GetSmaAnalysis||
|SKEW - Skewness||||skew|
|SDEV - Standard Deviation (Volatility)|`SDEV_Series`|✔️STDDEV|✔️GetStdDev|✔️stdev|✔️stddev|
|SSDEV - Sample Standard Deviation|`SSDEV_Series`|||✔️stdev|
|SMAPE - Symmetric Mean Absolute Percent Error|`SMAPE_Series`||||
|VAR - Population Variance|`VAR_Series`|✔️VAR||✔️variance|✔️var|
|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** |
|**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.md) | `SMA_Series` | ✔️SMA | ✔️GetSma | ✔️sma | ✔️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 |
|AFIRMA - Autoregressive Finite Impulse Response Moving Average|||||
|ALMA - Arnaud Legoux Moving Average|`ALMA_Series`||✔️GetAlma|alma|
|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|
|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|||GetEpma||
|MACD - Moving Average Convergence/Divergence|`MACD_Series`|✔️MACD|✔️GetMacd|✔️macd|✔️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|✔️rma|
|SINWMA - Sine Weighted Moving Average||||sinwma|
|SMA - Simple Moving Average|`SMA_Series`|✔️SMA|✔️GetSma|✔️sma|✔️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|❌tema|
|TRIMA - Triangular Moving Average|`TRIMA_Series`|✔️TRIMA||✔️trima|✔️trima|
|TSF - Time Series Forecast||TSF|||
|VIDYA - Variable Index Dynamic Average||||vidya|vidya|
|VORTEX - Vortex Indicator||||vortex|
|WMA - Weighted Moving Average|`WMA_Series`|✔️WMA|✔️GetWma|✔️wma|✔️wma|
|ZLEMA - Zero Lag EMA Average|`ZLEMA_Series`|||✔️zlma|❌zlema|
||||||
| **VOLATILITY INDICATORS** |
|**VOLATILITY INDICATORS**|
||||||
| ⭐ADL - Chaikin Accumulation Distribution Line | `ADL_Series` | ✔️AD | ✔️GetAdl | ✔️ad | ✔️ad |
| ⭐ADOSC - Chaikin Accumulation Distribution Oscillator | `ADOSC_Series` | ✔️ADOSC| | ✔️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 |||||
|⭐ADL - Chaikin Accumulation Distribution Line|`ADL_Series`|✔️AD|✔️GetAdl|✔️ad|✔️ad|
|⭐ADOSC - Chaikin Accumulation Distribution Oscillator|`ADOSC_Series`|✔️ADOSC||✔️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|✔️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|✔️tr|
|UI - Ulcer Index|||||
|VSTOP - Volatility Stop|||||
||||||
| **MOMENTUM INDICATORS & OSCILLATORS** |
|**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_Series` | ❌CMO | ❌GetCmo | ❌cmo | 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 | TRIX | GetTrix | trix |
| TSI - True Strength Index |||||
| UO - Ultimate Oscillator || ULTOSC | GetUltimate ||
| WILLR - Larry Williams' %R || WILLR | GetWilliamsR ||
| WGAT - Williams Alligator |||||
|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_Series`|❌CMO|✔️GetCmo|❌cmo|✔️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_Series`|❌TRIX|❌GetTrix|✔️trix|❌trix|
|TSI - True Strength Index|||||
|UO - Ultimate Oscillator||ULTOSC|GetUltimate||ultosc|
|WILLR - Larry Williams' %R||WILLR|GetWilliamsR||willr|
|WGAT - Williams Alligator|||||
||||||
| **VOLUME INDICATORS** |
|**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 |||||
|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|✔️obv|❌obv|
|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|||||vwma|