diff --git a/.github/workflows/main_automation.yml b/.github/workflows/main_automation.yml index d709839a..0b08acd9 100644 --- a/.github/workflows/main_automation.yml +++ b/.github/workflows/main_automation.yml @@ -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 \ No newline at end of file +# --skip-duplicate \ No newline at end of file diff --git a/Docs/coverage.md b/Docs/coverage.md index fbd725dd..7d8b9e97 100644 --- a/Docs/coverage.md +++ b/Docs/coverage.md @@ -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 |✔️|✔️||| diff --git a/Quantower/Indicators/ZLMA_chart.cs b/Quantower/Indicators/ZLMA_chart.cs index e8370495..c8a23b28 100644 --- a/Quantower/Indicators/ZLMA_chart.cs +++ b/Quantower/Indicators/ZLMA_chart.cs @@ -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), diff --git a/Source/Indicators/JMA_Series.cs b/Source/Indicators/JMA_Series.cs index 4a9068c2..7359c4d4 100644 --- a/Source/Indicators/JMA_Series.cs +++ b/Source/Indicators/JMA_Series.cs @@ -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); } } diff --git a/Source/Indicators/KAMA_Series.cs b/Source/Indicators/KAMA_Series.cs index 20c49714..2f46e25d 100644 --- a/Source/Indicators/KAMA_Series.cs +++ b/Source/Indicators/KAMA_Series.cs @@ -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 _buffer = new(); private double _lastkama = double.NaN; private double _lastlastkama; diff --git a/Source/Statistics/ENTP_Series.cs b/Source/Statistics/ENTP_Series.cs index d39c58cd..a75af82f 100644 --- a/Source/Statistics/ENTP_Series.cs +++ b/Source/Statistics/ENTP_Series.cs @@ -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 _buffer = new(); private readonly System.Collections.Generic.List _buff2 = new(); diff --git a/Source/Statistics/KURT_Series.cs b/Source/Statistics/KURT_Series.cs index c6fb3c8a..be84dabe 100644 --- a/Source/Statistics/KURT_Series.cs +++ b/Source/Statistics/KURT_Series.cs @@ -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/ - + */ 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 _buffer = new(); public override void Add((System.DateTime t, double v) TValue, bool update)