mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-07-31 10:57:43 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -50,12 +50,12 @@ jobs:
|
||||
/d:sonar.cs.dotcover.reportsPaths=./coveragereport.html
|
||||
|
||||
- name: Build Core DLL
|
||||
run: dotnet build ./Source/QuanTAlib.csproj --verbosity normal --configuration Debug --nologo
|
||||
run: dotnet build ./Source/QuanTAlib.csproj --verbosity normal --configuration Release --nologo
|
||||
- name: Build Quantower DLL
|
||||
run: dotnet build ./Quantower/Quantower.csproj --verbosity normal --configuration Debug --nologo
|
||||
run: dotnet build ./Quantower/Quantower.csproj --verbosity normal --configuration Release --nologo
|
||||
|
||||
- name: dotnet Test
|
||||
run: dotnet test ./Tests/Tests.csproj --verbosity normal --configuration Debug --nologo
|
||||
run: dotnet test ./Tests/Tests.csproj --verbosity normal --configuration Release --nologo
|
||||
- name: DotCover Test XML
|
||||
run: dotnet dotcover test ./Tests/Tests.csproj --verbosity normal --framework net7.0 --dcReportType=DetailedXML --dcoutput=./coveragereport.xml
|
||||
- name: DotCover Test HTML
|
||||
@@ -99,4 +99,4 @@ jobs:
|
||||
run: dotnet nuget push '.\Source\bin\Release\QuanTAlib.*.nupkg'
|
||||
--api-key ${{ secrets.NUGET_DEPLOY_KEY_QUANTLIB }}
|
||||
--source https://api.nuget.org/v3/index.json
|
||||
--skip-duplicate
|
||||
# --skip-duplicate
|
||||
@@ -9,6 +9,7 @@
|
||||
| OHL3 - (Open+High+Low)/3 |✔️|||✔️|
|
||||
| OHLC4 - (O+H+L+C)/4 |✔️|||✔️|
|
||||
| HLCC4 - Weighted Price |✔️||✔️|✔️|
|
||||
| ZL - Zero Lag - De-lagged price |✔️|||✔️|
|
||||
| ADD - Addition |✔️|✔️|||
|
||||
| SUB - Subtraction |✔️|✔️|||
|
||||
| MUL - Multiplication |✔️|✔️|||
|
||||
|
||||
@@ -33,7 +33,6 @@ public class ZLMA_chart : Indicator
|
||||
|
||||
private TBars bars;
|
||||
///////
|
||||
private ZL_Series zerolag;
|
||||
private TSeries indicator;
|
||||
///////
|
||||
|
||||
@@ -63,7 +62,7 @@ public class ZLMA_chart : Indicator
|
||||
};
|
||||
|
||||
this.ShortName = "ZLMA (" + maname + ", " + TBars.SelectStr(this.DataSource) + ", " + this.Period + ")";
|
||||
this.zerolag = new(source: bars.Select(this.DataSource), period: this.Period, useNaN: false);
|
||||
ZL_Series zerolag = new(source: bars.Select(this.DataSource), period: this.Period, useNaN: false);
|
||||
this.indicator = matype switch
|
||||
{
|
||||
0 => new SMA_Series(source: zerolag, period: this.Period, useNaN: false),
|
||||
|
||||
@@ -27,7 +27,7 @@ public class JMA_Series : Single_TSeries_Indicator
|
||||
private double prev_ma1, prev_det0, prev_det1, prev_jma, bsmax, bsmin;
|
||||
private double o_prev_ma1, o_prev_det0, o_prev_det1, o_prev_jma, o_bsmax, o_bsmin;
|
||||
|
||||
private readonly double pr, pow1, len2, beta, rvolty, _l;
|
||||
private readonly double pr, pow1, len2, beta, rvolty;
|
||||
|
||||
public JMA_Series(TSeries source, int period, double phase = 0.0, bool useNaN = false) : base(source, period, useNaN)
|
||||
{
|
||||
@@ -41,7 +41,7 @@ public class JMA_Series : Single_TSeries_Indicator
|
||||
this.rvolty = Math.Exp((1 / this.pow1) * Math.Log(len1));
|
||||
this.len2 = Math.Sqrt(0.5 * (_p - 1)) * len1;
|
||||
this.beta = 0.45 * (_p - 1) / (0.45 * (_p - 1) + 2);
|
||||
this._l = (int)Math.Round(this._p - 1 * 0.5);
|
||||
//this._l = (int)Math.Round(this._p - 1 * 0.5);
|
||||
|
||||
if (base._data.Count > 0) { base.Add(base._data); }
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ Remark:
|
||||
|
||||
public class KAMA_Series : Single_TSeries_Indicator
|
||||
{
|
||||
private static double _scFast, _scSlow;
|
||||
private readonly double _scFast, _scSlow;
|
||||
private readonly System.Collections.Generic.List<double> _buffer = new();
|
||||
private double _lastkama = double.NaN;
|
||||
private double _lastlastkama;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class ENTP_Series : Single_TSeries_Indicator
|
||||
this._logbase = logbase;
|
||||
if (base._data.Count > 0) { base.Add(base._data); }
|
||||
}
|
||||
private readonly double _logbase = 2.0;
|
||||
private readonly double _logbase;
|
||||
private readonly System.Collections.Generic.List<double> _buffer = new();
|
||||
private readonly System.Collections.Generic.List<double> _buff2 = new();
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Calculation:
|
||||
Sources:
|
||||
https://en.wikipedia.org/wiki/Kurtosis
|
||||
https://stats.oarc.ucla.edu/other/mult-pkg/faq/general/faq-whats-with-the-different-formulas-for-kurtosis/
|
||||
|
||||
|
||||
</summary> */
|
||||
|
||||
public class KURT_Series : Single_TSeries_Indicator
|
||||
@@ -30,7 +30,7 @@ public class KURT_Series : Single_TSeries_Indicator
|
||||
this._logbase = logbase;
|
||||
if (base._data.Count > 0) { base.Add(base._data); }
|
||||
}
|
||||
protected double _logbase = 2.0;
|
||||
protected double _logbase;
|
||||
private readonly System.Collections.Generic.List<double> _buffer = new();
|
||||
|
||||
public override void Add((System.DateTime t, double v) TValue, bool update)
|
||||
|
||||
Reference in New Issue
Block a user