diff --git a/.editorconfig b/.editorconfig
index 8be070d53..d1b69b057 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,7 +1,7 @@
# top-most EditorConfig file
root = true
-# global baselines
+#### Core EditorConfig Options ####
[*]
charset = utf-8
end_of_line = lf
@@ -11,117 +11,134 @@ indent_size = 2
tab_width = 2
line_length = 150
-max_line_length = 150
trim_trailing_whitespace = true
insert_final_newline = true
-[*.{csproj,props,targets}]
-indent_style = space
-indent_size = 2
-
-[*.yml]
-indent_style = space
-indent_size = 2
-
-[*.{cs,vb}]
-tab_width = 4
+# .NET Globals
+[*.cs]
indent_size = 4
-end_of_line = lf
-
-#### Naming styles ####
+tab_width = 4
-# Naming rules
+#### .NET Coding Conventions ####
+# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/overview
-dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
-dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
-dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
+# Organize usings
+dotnet_separate_import_directive_groups = false
+dotnet_sort_system_directives_first = true
+file_header_template = unset
-dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
-dotnet_naming_rule.types_should_be_pascal_case.symbols = types
-dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
+# Modifier preferences
+dotnet_style_require_accessibility_modifiers = for_non_interface_members
-dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
-dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
-dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
+# Expression-level preferences
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_namespace_match_folder = false:none
+dotnet_style_null_propagation = true:suggestion
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_prefer_auto_properties = true:suggestion
+dotnet_style_prefer_compound_assignment = true
+dotnet_style_prefer_conditional_expression_over_assignment = true
+dotnet_style_prefer_conditional_expression_over_return = true
+dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
+dotnet_style_prefer_inferred_anonymous_type_member_names = true
+dotnet_style_prefer_inferred_tuple_names = true
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
+dotnet_style_prefer_simplified_boolean_expressions = true
+dotnet_style_prefer_simplified_interpolation = true
-# Symbol specifications
+# Collection expression preferences
+dotnet_style_prefer_collection_expression = true:suggestion
+dotnet_diagnostic.IDE0305.severity = none # exclude collection expression for fluent
+csharp_space_between_square_brackets = false
+csharp_space_between_empty_square_brackets = false
+
+# Parentheses preferences
+dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
+dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
+dotnet_style_parentheses_in_other_operators = never_if_unnecessary
+dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
+
+# Code block and new line preferences
+dotnet_style_prefer_braces = true:suggestion
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
+dotnet_style_allow_multiple_blank_lines_experimental = true
+dotnet_style_allow_statement_immediately_after_block_experimental = false
-dotnet_naming_symbols.interface.applicable_kinds = interface
-dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.interface.required_modifiers =
+# Wrapping preferences
+csharp_preserve_single_line_blocks = true
+csharp_preserve_single_line_statements = true
-dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
-dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.types.required_modifiers =
+# Field preferences
+dotnet_style_readonly_field = true
-dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
-dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.non_field_members.required_modifiers =
+# Assignment preferences
+dotnet_code_quality_unused_parameters = warning
+dotnet_code_quality_unused_value = warning
-# Naming styles
+# Suppression preferences
+dotnet_remove_unnecessary_suppression_exclusions = suggestion
+# Naming conventions
+dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_style.begins_with_i.required_prefix = I
-dotnet_naming_style.begins_with_i.required_suffix =
-dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case
+dotnet_code_quality_explicit_tuple_names = true:suggestion
+dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
-dotnet_naming_style.pascal_case.required_prefix =
-dotnet_naming_style.pascal_case.required_suffix =
-dotnet_naming_style.pascal_case.word_separator =
-dotnet_naming_style.pascal_case.capitalization = pascal_case
-
-dotnet_naming_style.pascal_case.required_prefix =
-dotnet_naming_style.pascal_case.required_suffix =
-dotnet_naming_style.pascal_case.word_separator =
-dotnet_naming_style.pascal_case.capitalization = pascal_case
-
-dotnet_code_quality_unused_parameters = all:suggestion
+#### C# Coding Conventions ####
+# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options
-dotnet_sort_system_directives_first = true
-
-dotnet_style_operator_placement_when_wrapping = beginning_of_line
-dotnet_style_predefined_type_for_locals_parameters_members = true:silent
-dotnet_style_namespace_match_folder = false:none
-dotnet_style_coalesce_expression = true:suggestion
-dotnet_style_null_propagation = true:suggestion
-dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
-dotnet_style_prefer_auto_properties = true:silent
-dotnet_style_object_initializer = true:suggestion
-dotnet_style_prefer_collection_expression = true:suggestion
-
-[*.cs]
-# ref: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options
+# var preferences
+csharp_style_var_elsewhere = false
+csharp_style_var_for_built_in_types = false
+csharp_style_var_when_type_is_apparent = false
+# Labeling and using directives
csharp_indent_labels = one_less_than_current
csharp_using_directive_placement = outside_namespace:warning
-csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_static_local_function = true:suggestion
+# Namespace and method preferences
csharp_style_namespace_declarations = file_scoped:suggestion
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion
+
+# Expression-bodied Members
csharp_style_expression_bodied_methods = true:silent
-csharp_style_expression_bodied_constructors = false:silent
-csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_lambdas = true:silent
-csharp_style_expression_bodied_local_functions = false:silent
+
+# Function preferences
csharp_style_prefer_local_over_anonymous_function = true:suggestion
-csharp_style_unused_value_assignment_preference = unused_local_variable:suggestion
csharp_style_prefer_switch_expression = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_extended_property_pattern = true:suggestion
+
+# Variable declarations
csharp_style_inlined_variable_declaration = true:suggestion
+csharp_style_unused_value_assignment_preference = unused_local_variable:suggestion
+
+# Modifier preferences
+csharp_prefer_static_local_function = true
+csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
+csharp_style_prefer_readonly_struct = true
+csharp_style_prefer_readonly_struct_member = true
-# braces
+# Code block preferences
csharp_prefer_braces = true:suggestion
+csharp_prefer_simple_using_statement = true:suggestion
+csharp_type_declaration_braces = next_line
+csharp_empty_block_style = together_same_line
+# New line preferences
csharp_new_line_before_open_brace = methods, properties, control_blocks, types
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
@@ -130,11 +147,9 @@ csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_before_members_in_anonymous_types = false
csharp_new_line_between_query_expression_clauses = false
-# braces overrides
-csharp_type_declaration_braces = next_line
-csharp_empty_block_style = together_same_line
-
-# diagnostic analyzers
-dotnet_diagnostic.CA1303.severity = none
-dotnet_diagnostic.CS1591.severity = silent
-dotnet_diagnostic.IDE0058.severity = none
+# Diagnostic analyzer suppressions
+dotnet_diagnostic.CA1303.severity = none # Passing literals as localized parameters
+dotnet_diagnostic.CA2263.severity = none # Prefer generic overload type parameter
+dotnet_diagnostic.CS1591.severity = silent # Missing XML comment for publicly visible type or member
+dotnet_diagnostic.IDE0058.severity = none # Unused expression value
+dotnet_diagnostic.IDE0072.severity = silent # Missing cases in switch statement
diff --git a/.github/workflows/deploy-package.yml b/.github/workflows/deploy-package.yml
index c471762e6..3700d9c11 100644
--- a/.github/workflows/deploy-package.yml
+++ b/.github/workflows/deploy-package.yml
@@ -64,7 +64,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
- dotnet-version: "8.x"
+ dotnet-version: "9.x"
dotnet-quality: "ga"
- name: Build library
@@ -100,7 +100,7 @@ jobs:
echo "| Minor | ${{ steps.gitversion.outputs.minor }} |"
echo "| Patch | ${{ steps.gitversion.outputs.patch }} |"
echo "| Base | ${{ steps.gitversion.outputs.majorMinorPatch }} |"
- echo "| Composed | ${{ steps.compose.outputs.version }} |"
+ echo "| Composed | ${{ steps.compose.outputs.version }} |"
} >> $GITHUB_STEP_SUMMARY
deploy:
@@ -130,7 +130,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
- dotnet-version: "8.x"
+ dotnet-version: "9.x"
dotnet-quality: "ga"
- name: Setup NuGet
diff --git a/.github/workflows/lint-pull-request.yml b/.github/workflows/lint-pull-request.yml
index 8fb6295e2..1d78109ba 100644
--- a/.github/workflows/lint-pull-request.yml
+++ b/.github/workflows/lint-pull-request.yml
@@ -47,7 +47,7 @@ jobs:
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
- message: >
+ message: |
### Hey there and thank you for opening this pull request! ððž
It looks like your proposed **_Pull request title_** needs to be adjusted.
diff --git a/.github/workflows/test-codeql.yml b/.github/workflows/test-codeql.yml
new file mode 100644
index 000000000..99a0a94ef
--- /dev/null
+++ b/.github/workflows/test-codeql.yml
@@ -0,0 +1,52 @@
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ "main", "v3" ]
+
+ pull_request:
+ branches: [ "main", "v3" ]
+
+ schedule:
+ - cron: '37 14 * * 3'
+
+jobs:
+
+ analyze:
+ name: analyze
+ runs-on: 'ubuntu-latest'
+
+ permissions:
+ security-events: write
+ packages: read
+ actions: read
+ contents: read
+
+ steps:
+
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: csharp
+ build-mode: manual
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 9.x
+ dotnet-quality: "ga"
+
+ - name: Build library
+ run: >
+ dotnet build
+ --configuration Release
+ --property:ContinuousIntegrationBuild=true
+ -warnAsError
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: "/language:csharp"
diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml
index 7b63a2fd1..fa0727d6a 100644
--- a/.github/workflows/test-examples.yml
+++ b/.github/workflows/test-examples.yml
@@ -25,7 +25,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
- dotnet-version: "8.x"
+ dotnet-version: "9.x"
dotnet-quality: "ga"
- name: Build examples
diff --git a/.github/workflows/test-indicators.yml b/.github/workflows/test-indicators.yml
index 72d8ef4d6..dc75ed20b 100644
--- a/.github/workflows/test-indicators.yml
+++ b/.github/workflows/test-indicators.yml
@@ -20,16 +20,18 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
- dotnet-version: ["2.0.x", "6.x", "8.x"]
+ dotnet-version: ["9.x"]
+ # TODO: restore when runners have 9.x on all
+ # ["2.1.x", "6.x", "9.x"]
env:
# identifying primary configuration so only one reports coverage
- IS_PRIMARY: ${{ matrix.os == 'ubuntu-latest' && matrix.dotnet-version == '8.x' }}
+ IS_PRIMARY: ${{ matrix.os == 'ubuntu-latest' && matrix.dotnet-version == '9.x' }}
# .NET SDK versions in the matrix that support `ga` quality spec
# versions before 5.x do not support it
- SUPPORT_GA: ${{ contains(fromJson('["6.x", "8.x"]'), matrix.dotnet-version) }}
+ SUPPORT_GA: ${{ contains(fromJson('["6.x", "9.x"]'), matrix.dotnet-version) }}
steps:
diff --git a/.github/workflows/test-performance.yml b/.github/workflows/test-performance.yml
index 46056c64e..ebbbfad62 100644
--- a/.github/workflows/test-performance.yml
+++ b/.github/workflows/test-performance.yml
@@ -33,7 +33,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
- dotnet-version: "8.x"
+ dotnet-version: "9.x"
dotnet-quality: "ga"
- name: Build library
diff --git a/.github/workflows/test-website-a11y.yml b/.github/workflows/test-website-a11y.yml
index d7164fb04..3ac2647bc 100644
--- a/.github/workflows/test-website-a11y.yml
+++ b/.github/workflows/test-website-a11y.yml
@@ -23,7 +23,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
working-directory: docs
- ruby-version: 3.2
+ ruby-version: 3.3
- name: Install GEMs
working-directory: docs
diff --git a/.github/workflows/test-website-links.yml b/.github/workflows/test-website-links.yml
index 4d9136ec2..99245dcef 100644
--- a/.github/workflows/test-website-links.yml
+++ b/.github/workflows/test-website-links.yml
@@ -23,7 +23,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
working-directory: docs
- ruby-version: 3.2
+ ruby-version: 3.3
- name: Install GEMs
working-directory: docs
diff --git a/docs/examples/Backtest/Backtest.csproj b/docs/examples/Backtest/Backtest.csproj
index 8630a4433..911edb610 100644
--- a/docs/examples/Backtest/Backtest.csproj
+++ b/docs/examples/Backtest/Backtest.csproj
@@ -2,12 +2,12 @@
Exe
- net8.0
+ net9.0
enable
-
+
diff --git a/docs/examples/ConsoleApp/ConsoleApp.csproj b/docs/examples/ConsoleApp/ConsoleApp.csproj
index 8630a4433..911edb610 100644
--- a/docs/examples/ConsoleApp/ConsoleApp.csproj
+++ b/docs/examples/ConsoleApp/ConsoleApp.csproj
@@ -2,12 +2,12 @@
Exe
- net8.0
+ net9.0
enable
-
+
diff --git a/docs/examples/CustomIndicators/CustomIndicatorsLibrary.csproj b/docs/examples/CustomIndicators/CustomIndicatorsLibrary.csproj
index fd0f13607..b7dd009bc 100644
--- a/docs/examples/CustomIndicators/CustomIndicatorsLibrary.csproj
+++ b/docs/examples/CustomIndicators/CustomIndicatorsLibrary.csproj
@@ -1,12 +1,12 @@
- net8.0
+ net9.0
enable
-
+
diff --git a/docs/examples/CustomIndicatorsUsage/CustomIndicatorsUsage.csproj b/docs/examples/CustomIndicatorsUsage/CustomIndicatorsUsage.csproj
index 3a1896172..3099a2d1b 100644
--- a/docs/examples/CustomIndicatorsUsage/CustomIndicatorsUsage.csproj
+++ b/docs/examples/CustomIndicatorsUsage/CustomIndicatorsUsage.csproj
@@ -2,12 +2,12 @@
Exe
- net8.0
+ net9.0
enable
-
+
diff --git a/docs/examples/ObserveStream/ObserveStream.csproj b/docs/examples/ObserveStream/ObserveStream.csproj
index 8c1656c90..b00a69c7f 100644
--- a/docs/examples/ObserveStream/ObserveStream.csproj
+++ b/docs/examples/ObserveStream/ObserveStream.csproj
@@ -2,12 +2,12 @@
Exe
- net8.0
+ net9.0
enable
-
+
diff --git a/docs/examples/Skender.Stock.Indicators-Examples.zip b/docs/examples/Skender.Stock.Indicators-Examples.zip
index 96fed5aaa..bf1788815 100644
Binary files a/docs/examples/Skender.Stock.Indicators-Examples.zip and b/docs/examples/Skender.Stock.Indicators-Examples.zip differ
diff --git a/docs/examples/UseQuoteApi/UseQuoteApi.csproj b/docs/examples/UseQuoteApi/UseQuoteApi.csproj
index 77a280915..44a2c3f2c 100644
--- a/docs/examples/UseQuoteApi/UseQuoteApi.csproj
+++ b/docs/examples/UseQuoteApi/UseQuoteApi.csproj
@@ -2,13 +2,13 @@
Exe
- net8.0
+ net9.0
enable
-
-
+
+
diff --git a/docs/pages/home.md b/docs/pages/home.md
index a9dba6239..7915db21e 100644
--- a/docs/pages/home.md
+++ b/docs/pages/home.md
@@ -69,8 +69,8 @@ See the [guide]({{site.baseurl}}/guide/#content) and the [full list of indicator
Our [NuGet library](https://www.nuget.org/packages/Skender.Stock.Indicators) directly targets all current frameworks for peak performance, including the .NET Standard for older framework compatibility.
-- .NET 8.0, 7.0, 6.0
-- .NET Standard 2.1, 2.0
+- .NET 9.0, 8.0, 6.0
+- .NET Standard 2.1
The compiled library package is [Common Language Specification (CLS) compliant](https://docs.microsoft.com/en-us/dotnet/standard/common-type-system) and can be used in other programming languages, including Python and everything in the .NET universe.
diff --git a/docs/pages/performance.md b/docs/pages/performance.md
index 319015dcc..669e4d9c1 100644
--- a/docs/pages/performance.md
+++ b/docs/pages/performance.md
@@ -6,113 +6,109 @@ relative_path: pages/performance.md
layout: page
---
-# {{ page.title }} for v2.4.11
+# {{ page.title }} for v2.6.0
These are the execution times for the current indicators using two years of historical daily stock quotes (502 periods) with default or typical parameters.
``` bash
-BenchmarkDotNet v0.13.9, Windows 10
-Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores
-.NET SDK 7.0.402
- [Host] : .NET 7.0.12 (7.0.1223.47720), X64 RyuJIT AVX2
+BenchmarkDotNet v0.14.0, Ubuntu 22.04.5 LTS (Jammy Jellyfish)
+AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
+.NET SDK 9.0.100
+ [Host] : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2
```
-
-## indicators
-
-| Method | Mean | Error | StdDev | Median |
-|------------------- |-------------:|----------:|----------:|-------------:|
-| GetAdl | 59.039 Ξs | 0.5747 Ξs | 0.5094 Ξs | 58.952 Ξs |
-| GetAdlWithSma | 69.657 Ξs | 0.6687 Ξs | 0.5584 Ξs | 69.452 Ξs |
-| GetAdx | 71.841 Ξs | 1.2287 Ξs | 2.5099 Ξs | 70.816 Ξs |
-| GetAlligator | 69.392 Ξs | 0.3080 Ξs | 0.2572 Ξs | 69.406 Ξs |
-| GetAlma | 58.394 Ξs | 1.1506 Ξs | 2.4769 Ξs | 57.207 Ξs |
-| GetAroon | 118.119 Ξs | 0.2383 Ξs | 0.2112 Ξs | 118.115 Ξs |
-| GetAtr | 61.479 Ξs | 0.2266 Ξs | 0.2120 Ξs | 61.404 Ξs |
-| GetAtrStop | 88.143 Ξs | 0.2664 Ξs | 0.2362 Ξs | 88.111 Ξs |
-| GetAwesome | 71.855 Ξs | 0.2753 Ξs | 0.2440 Ξs | 71.754 Ξs |
-| GetBeta | 200.507 Ξs | 0.7199 Ξs | 0.6382 Ξs | 200.542 Ξs |
-| GetBetaUp | 212.544 Ξs | 2.6352 Ξs | 2.2005 Ξs | 211.601 Ξs |
-| GetBetaDown | 208.804 Ξs | 0.4363 Ξs | 0.4081 Ξs | 208.922 Ξs |
-| GetBetaAll | 442.614 Ξs | 4.1229 Ξs | 3.4428 Ξs | 441.238 Ξs |
-| GetBollingerBands | 103.036 Ξs | 0.3631 Ξs | 0.3396 Ξs | 102.982 Ξs |
-| GetBop | 63.915 Ξs | 0.1023 Ξs | 0.0798 Ξs | 63.937 Ξs |
-| GetCci | 76.254 Ξs | 0.3576 Ξs | 0.3170 Ξs | 76.169 Ξs |
-| GetChaikinOsc | 83.022 Ξs | 0.2467 Ξs | 0.2060 Ξs | 83.036 Ξs |
-| GetChandelier | 99.088 Ξs | 0.1846 Ξs | 0.1636 Ξs | 99.079 Ξs |
-| GetChop | 108.540 Ξs | 0.3124 Ξs | 0.2769 Ξs | 108.419 Ξs |
-| GetCmf | 123.722 Ξs | 0.2383 Ξs | 0.2113 Ξs | 123.686 Ξs |
-| GetCmo | 89.577 Ξs | 0.2785 Ξs | 0.2326 Ξs | 89.559 Ξs |
-| GetConnorsRsi | 183.793 Ξs | 0.2919 Ξs | 0.2588 Ξs | 183.831 Ξs |
-| GetCorrelation | 159.692 Ξs | 0.3176 Ξs | 0.2815 Ξs | 159.742 Ξs |
-| GetDema | 50.569 Ξs | 0.1348 Ξs | 0.1195 Ξs | 50.529 Ξs |
-| GetDoji | 102.564 Ξs | 0.2502 Ξs | 0.2089 Ξs | 102.621 Ξs |
-| GetDonchian | 296.274 Ξs | 1.7686 Ξs | 1.6543 Ξs | 296.023 Ξs |
-| GetDpo | 87.126 Ξs | 0.4292 Ξs | 0.3805 Ξs | 87.049 Ξs |
-| GetElderRay | 97.718 Ξs | 0.3713 Ξs | 0.3101 Ξs | 97.690 Ξs |
-| GetEma | 52.313 Ξs | 0.0998 Ξs | 0.0885 Ξs | 52.286 Ξs |
-| GetEmaStream | 9.583 Ξs | 0.0318 Ξs | 0.0297 Ξs | 9.582 Ξs |
-| GetEpma | 90.369 Ξs | 0.1802 Ξs | 0.1504 Ξs | 90.345 Ξs |
-| GetFcb | 323.945 Ξs | 1.1806 Ξs | 1.0466 Ξs | 323.639 Ξs |
-| GetFisherTransform | 86.202 Ξs | 1.0737 Ξs | 1.6071 Ξs | 85.535 Ξs |
-| GetForceIndex | 58.920 Ξs | 0.0919 Ξs | 0.0815 Ξs | 58.917 Ξs |
-| GetFractal | 88.772 Ξs | 0.2520 Ξs | 0.2104 Ξs | 88.747 Ξs |
-| GetGator | 105.737 Ξs | 0.2060 Ξs | 0.1927 Ξs | 105.707 Ξs |
-| GetHeikinAshi | 149.540 Ξs | 0.2668 Ξs | 0.2495 Ξs | 149.501 Ξs |
-| GetHma | 169.999 Ξs | 0.4300 Ξs | 0.3590 Ξs | 169.946 Ξs |
-| GetHtTrendline | 117.775 Ξs | 0.1738 Ξs | 0.1451 Ξs | 117.750 Ξs |
-| GetHurst | 1,022.251 Ξs | 3.0030 Ξs | 2.8090 Ξs | 1,021.373 Ξs |
-| GetIchimoku | 825.739 Ξs | 3.0491 Ξs | 2.7030 Ξs | 825.078 Ξs |
-| GetKama | 63.739 Ξs | 0.1591 Ξs | 0.1410 Ξs | 63.773 Ξs |
-| GetKlinger | 69.183 Ξs | 0.3546 Ξs | 0.3317 Ξs | 69.165 Ξs |
-| GetKeltner | 108.516 Ξs | 0.6956 Ξs | 0.6506 Ξs | 108.764 Ξs |
-| GetKvo | 69.480 Ξs | 0.2219 Ξs | 0.1967 Ξs | 69.388 Ξs |
-| GetMacd | 86.834 Ξs | 0.4236 Ξs | 0.3962 Ξs | 86.724 Ξs |
-| GetMaEnvelopes | 81.267 Ξs | 0.4835 Ξs | 0.4038 Ξs | 81.160 Ξs |
-| GetMama | 107.137 Ξs | 0.2352 Ξs | 0.2200 Ξs | 107.119 Ξs |
-| GetMarubozu | 130.650 Ξs | 0.4685 Ξs | 0.4383 Ξs | 130.462 Ξs |
-| GetMfi | 85.911 Ξs | 0.1860 Ξs | 0.1649 Ξs | 85.939 Ξs |
-| GetObv | 59.423 Ξs | 0.1679 Ξs | 0.1488 Ξs | 59.375 Ξs |
-| GetObvWithSma | 71.693 Ξs | 0.1535 Ξs | 0.1436 Ξs | 71.684 Ξs |
-| GetParabolicSar | 63.203 Ξs | 0.2489 Ξs | 0.2328 Ξs | 63.175 Ξs |
-| GetPivotPoints | 73.940 Ξs | 0.2168 Ξs | 0.2028 Ξs | 73.889 Ξs |
-| GetPivots | 162.539 Ξs | 0.4111 Ξs | 0.3845 Ξs | 162.302 Ξs |
-| GetPmo | 69.433 Ξs | 0.3262 Ξs | 0.3051 Ξs | 69.365 Ξs |
-| GetPrs | 93.780 Ξs | 0.1971 Ξs | 0.1844 Ξs | 93.757 Ξs |
-| GetPrsWithSma | 103.931 Ξs | 0.7102 Ξs | 0.6296 Ξs | 103.713 Ξs |
-| GetPvo | 79.227 Ξs | 1.3457 Ξs | 2.0951 Ξs | 78.449 Ξs |
-| GetRenko | 92.727 Ξs | 0.2168 Ξs | 0.1922 Ξs | 92.715 Ξs |
-| GetRenkoAtr | 97.115 Ξs | 0.2640 Ξs | 0.2340 Ξs | 97.109 Ξs |
-| GetRoc | 58.376 Ξs | 0.0813 Ξs | 0.0721 Ξs | 58.378 Ξs |
-| GetRocWb | 77.738 Ξs | 0.1986 Ξs | 0.1857 Ξs | 77.695 Ξs |
-| GetRocWithSma | 68.037 Ξs | 0.2058 Ξs | 0.1719 Ξs | 67.987 Ξs |
-| GetRollingPivots | 337.463 Ξs | 0.6625 Ξs | 0.5873 Ξs | 337.428 Ξs |
-| GetRsi | 51.189 Ξs | 0.1106 Ξs | 0.1035 Ξs | 51.233 Ξs |
-| GetSlope | 90.432 Ξs | 0.1067 Ξs | 0.0891 Ξs | 90.453 Ξs |
-| GetSma | 55.180 Ξs | 0.0809 Ξs | 0.0717 Ξs | 55.166 Ξs |
-| GetSmaAnalysis | 78.865 Ξs | 0.2377 Ξs | 0.2224 Ξs | 78.806 Ξs |
-| GetSmi | 63.542 Ξs | 0.2992 Ξs | 0.2799 Ξs | 63.493 Ξs |
-| GetSmma | 49.599 Ξs | 0.1641 Ξs | 0.1370 Ξs | 49.628 Ξs |
-| GetStarcBands | 109.124 Ξs | 0.2264 Ξs | 0.1767 Ξs | 109.061 Ξs |
-| GetStc | 123.629 Ξs | 0.4272 Ξs | 0.3787 Ξs | 123.626 Ξs |
-| GetStdDev | 102.272 Ξs | 0.2176 Ξs | 0.2035 Ξs | 102.199 Ξs |
-| GetStdDevWithSma | 117.003 Ξs | 0.2509 Ξs | 0.2225 Ξs | 116.955 Ξs |
-| GetStdDevChannels | 107.457 Ξs | 3.1051 Ξs | 9.1555 Ξs | 100.293 Ξs |
-| GetStoch | 99.240 Ξs | 0.1936 Ξs | 0.1716 Ξs | 99.205 Ξs |
-| GetStochSMMA | 83.248 Ξs | 0.2030 Ξs | 0.1585 Ξs | 83.232 Ξs |
-| GetStochRsi | 112.795 Ξs | 0.2191 Ξs | 0.2049 Ξs | 112.787 Ξs |
-| GetSuperTrend | 88.710 Ξs | 0.2540 Ξs | 0.2251 Ξs | 88.710 Ξs |
-| GetT3 | 56.609 Ξs | 0.0885 Ξs | 0.0785 Ξs | 56.584 Ξs |
-| GetTema | 51.801 Ξs | 0.1635 Ξs | 0.1530 Ξs | 51.750 Ξs |
-| GetTr | 58.327 Ξs | 0.1389 Ξs | 0.1160 Ξs | 58.332 Ξs |
-| GetTrix | 57.605 Ξs | 0.0856 Ξs | 0.0801 Ξs | 57.636 Ξs |
-| GetTrixWithSma | 60.952 Ξs | 0.1461 Ξs | 0.1295 Ξs | 60.969 Ξs |
-| GetTsi | 57.475 Ξs | 0.1275 Ξs | 0.1065 Ξs | 57.464 Ξs |
-| GetUlcerIndex | 223.441 Ξs | 0.9974 Ξs | 0.9796 Ξs | 223.031 Ξs |
-| GetUltimate | 85.577 Ξs | 0.2859 Ξs | 0.2232 Ξs | 85.546 Ξs |
-| GetVolatilityStop | 104.920 Ξs | 1.6186 Ξs | 1.2637 Ξs | 104.525 Ξs |
-| GetVortex | 69.805 Ξs | 0.1676 Ξs | 0.1485 Ξs | 69.825 Ξs |
-| GetVwap | 59.109 Ξs | 0.1576 Ξs | 0.1397 Ξs | 59.096 Ξs |
-| GetVwma | 71.345 Ξs | 0.2088 Ξs | 0.1954 Ξs | 71.267 Ξs |
-| GetWilliamsR | 100.541 Ξs | 0.1775 Ξs | 0.1386 Ξs | 100.536 Ξs |
-| GetWma | 62.707 Ξs | 0.1868 Ξs | 0.1656 Ξs | 62.660 Ξs |
-| GetZigZag | 165.914 Ξs | 0.3932 Ξs | 0.3678 Ξs | 165.698 Ξs |
+| Method | Mean | Error | StdDev |
+|------------------- |----------:|-----------:|---------:|
+| GetAdl | 34.89 Ξs | 2.409 Ξs | 0.132 Ξs |
+| GetAdx | 42.48 Ξs | 2.417 Ξs | 0.132 Ξs |
+| GetAlligator | 32.84 Ξs | 0.380 Ξs | 0.021 Ξs |
+| GetAlma | 27.08 Ξs | 0.524 Ξs | 0.029 Ξs |
+| GetAroon | 54.64 Ξs | 0.722 Ξs | 0.040 Ξs |
+| GetAtr | 36.40 Ξs | 4.916 Ξs | 0.269 Ξs |
+| GetAtrStop | 52.84 Ξs | 5.843 Ξs | 0.320 Ξs |
+| GetAwesome | 48.42 Ξs | 0.809 Ξs | 0.044 Ξs |
+| GetBeta | 164.01 Ξs | 23.671 Ξs | 1.297 Ξs |
+| GetBetaUp | 128.36 Ξs | 8.187 Ξs | 0.449 Ξs |
+| GetBetaDown | 133.49 Ξs | 5.559 Ξs | 0.305 Ξs |
+| GetBetaAll | 357.86 Ξs | 10.892 Ξs | 0.597 Ξs |
+| GetBollingerBands | 69.14 Ξs | 2.992 Ξs | 0.164 Ξs |
+| GetBop | 37.33 Ξs | 3.893 Ξs | 0.213 Ξs |
+| GetCci | 46.97 Ξs | 3.619 Ξs | 0.198 Ξs |
+| GetChaikinOsc | 55.48 Ξs | 2.268 Ξs | 0.124 Ξs |
+| GetChandelier | 53.86 Ξs | 6.396 Ξs | 0.351 Ξs |
+| GetChop | 59.92 Ξs | 0.953 Ξs | 0.052 Ξs |
+| GetCmf | 70.13 Ξs | 7.516 Ξs | 0.412 Ξs |
+| GetCmo | 33.04 Ξs | 2.522 Ξs | 0.138 Ξs |
+| GetConnorsRsi | 109.98 Ξs | 2.155 Ξs | 0.118 Ξs |
+| GetCorrelation | 96.95 Ξs | 7.741 Ξs | 0.424 Ξs |
+| GetDema | 22.99 Ξs | 1.052 Ξs | 0.058 Ξs |
+| GetDoji | 69.18 Ξs | 5.349 Ξs | 0.293 Ξs |
+| GetDonchian | 204.30 Ξs | 10.312 Ξs | 0.565 Ξs |
+| GetDpo | 48.21 Ξs | 1.477 Ξs | 0.081 Ξs |
+| GetDynamic | 39.30 Ξs | 1.816 Ξs | 0.100 Ξs |
+| GetElderRay | 53.86 Ξs | 4.422 Ξs | 0.242 Ξs |
+| GetEma | 22.31 Ξs | 1.314 Ξs | 0.072 Ξs |
+| GetEpma | 55.52 Ξs | 3.782 Ξs | 0.207 Ξs |
+| GetFcb | 217.82 Ξs | 6.294 Ξs | 0.345 Ξs |
+| GetFisherTransform | 52.84 Ξs | 1.077 Ξs | 0.059 Ξs |
+| GetForceIndex | 32.86 Ξs | 2.649 Ξs | 0.145 Ξs |
+| GetFractal | 48.06 Ξs | 5.058 Ξs | 0.277 Ξs |
+| GetGator | 59.64 Ξs | 9.488 Ξs | 0.520 Ξs |
+| GetHeikinAshi | 109.37 Ξs | 1.923 Ξs | 0.105 Ξs |
+| GetHma | 99.47 Ξs | 5.452 Ξs | 0.299 Ξs |
+| GetHtTrendline | 84.69 Ξs | 18.501 Ξs | 1.014 Ξs |
+| GetHurst | 838.65 Ξs | 127.955 Ξs | 7.014 Ξs |
+| GetIchimoku | 640.07 Ξs | 44.858 Ξs | 2.459 Ξs |
+| GetKama | 30.06 Ξs | 4.795 Ξs | 0.263 Ξs |
+| GetKlinger | 43.21 Ξs | 2.307 Ξs | 0.126 Ξs |
+| GetKeltner | 64.88 Ξs | 21.930 Ξs | 1.202 Ξs |
+| GetKvo | 43.35 Ξs | 3.056 Ξs | 0.168 Ξs |
+| GetMacd | 46.94 Ξs | 4.013 Ξs | 0.220 Ξs |
+| GetMaEnvelopes | 43.99 Ξs | 1.648 Ξs | 0.090 Ξs |
+| GetMama | 75.49 Ξs | 1.308 Ξs | 0.072 Ξs |
+| GetMarubozu | 78.81 Ξs | 3.513 Ξs | 0.193 Ξs |
+| GetMfi | 43.31 Ξs | 1.323 Ξs | 0.073 Ξs |
+| GetObv | 33.07 Ξs | 1.152 Ξs | 0.063 Ξs |
+| GetObvWithSma | 42.54 Ξs | 1.500 Ξs | 0.082 Ξs |
+| GetParabolicSar | 36.18 Ξs | 0.569 Ξs | 0.031 Ξs |
+| GetPivotPoints | 45.84 Ξs | 2.456 Ξs | 0.135 Ξs |
+| GetPivots | 87.39 Ξs | 1.025 Ξs | 0.056 Ξs |
+| GetPmo | 39.11 Ξs | 1.240 Ξs | 0.068 Ξs |
+| GetPrs | 40.60 Ξs | 2.618 Ξs | 0.144 Ξs |
+| GetPrsWithSma | 43.07 Ξs | 1.737 Ξs | 0.095 Ξs |
+| GetPvo | 44.81 Ξs | 2.604 Ξs | 0.143 Ξs |
+| GetRenko | 59.82 Ξs | 3.289 Ξs | 0.180 Ξs |
+| GetRenkoAtr | 67.58 Ξs | 24.816 Ξs | 1.360 Ξs |
+| GetRoc | 24.04 Ξs | 1.218 Ξs | 0.067 Ξs |
+| GetRocWb | 40.13 Ξs | 3.526 Ξs | 0.193 Ξs |
+| GetRocWithSma | 30.52 Ξs | 2.540 Ξs | 0.139 Ξs |
+| GetRollingPivots | 243.31 Ξs | 37.635 Ξs | 2.063 Ξs |
+| GetRsi | 25.91 Ξs | 0.812 Ξs | 0.044 Ξs |
+| GetSlope | 56.35 Ξs | 9.701 Ξs | 0.532 Ξs |
+| GetSma | 24.90 Ξs | 2.631 Ξs | 0.144 Ξs |
+| GetSmaAnalysis | 42.43 Ξs | 0.780 Ξs | 0.043 Ξs |
+| GetSmi | 37.50 Ξs | 1.633 Ξs | 0.089 Ξs |
+| GetSmma | 23.26 Ξs | 2.726 Ξs | 0.149 Ξs |
+| GetStarcBands | 71.22 Ξs | 27.014 Ξs | 1.481 Ξs |
+| GetStc | 82.32 Ξs | 4.596 Ξs | 0.252 Ξs |
+| GetStdDev | 71.29 Ξs | 1.644 Ξs | 0.090 Ξs |
+| GetStdDevWithSma | 76.73 Ξs | 1.728 Ξs | 0.095 Ξs |
+| GetStdDevChannels | 66.38 Ξs | 8.307 Ξs | 0.455 Ξs |
+| GetStoch | 51.89 Ξs | 3.650 Ξs | 0.200 Ξs |
+| GetStochSMMA | 50.08 Ξs | 3.252 Ξs | 0.178 Ξs |
+| GetStochRsi | 61.82 Ξs | 3.847 Ξs | 0.211 Ξs |
+| GetSuperTrend | 54.21 Ξs | 11.806 Ξs | 0.647 Ξs |
+| GetT3 | 26.51 Ξs | 0.176 Ξs | 0.010 Ξs |
+| GetTema | 23.74 Ξs | 1.415 Ξs | 0.078 Ξs |
+| GetTr | 33.63 Ξs | 5.232 Ξs | 0.287 Ξs |
+| GetTrix | 26.56 Ξs | 1.217 Ξs | 0.067 Ξs |
+| GetTrixWithSma | 30.39 Ξs | 1.462 Ξs | 0.080 Ξs |
+| GetTsi | 29.67 Ξs | 6.213 Ξs | 0.341 Ξs |
+| GetUlcerIndex | 95.21 Ξs | 2.543 Ξs | 0.139 Ξs |
+| GetUltimate | 58.52 Ξs | 2.435 Ξs | 0.133 Ξs |
+| GetVolatilityStop | 61.17 Ξs | 22.487 Ξs | 1.233 Ξs |
+| GetVortex | 43.12 Ξs | 1.817 Ξs | 0.100 Ξs |
+| GetVwap | 33.56 Ξs | 1.656 Ξs | 0.091 Ξs |
+| GetVwma | 42.38 Ξs | 1.098 Ξs | 0.060 Ξs |
+| GetWilliamsR | 52.27 Ξs | 0.135 Ξs | 0.007 Ξs |
+| GetWma | 31.98 Ξs | 2.411 Ξs | 0.132 Ξs |
+| GetZigZag | 99.35 Ξs | 5.101 Ξs | 0.280 Ξs |
diff --git a/src/Indicators.csproj b/src/Indicators.csproj
index d78154c16..907e5dad4 100644
--- a/src/Indicators.csproj
+++ b/src/Indicators.csproj
@@ -1,7 +1,7 @@
- net8.0;net7.0;net6.0;netstandard2.1;netstandard2.0
+ net9.0;net8.0;net6.0;netstandard2.1
Dave Skender
Stock Indicators for .NET
@@ -14,7 +14,7 @@
Skender.Stock.Indicators
Skender.Stock.Indicators
- 12.0
+ 13.0
en-US
false
diff --git a/src/_common/Globals.cs b/src/_common/Globals.cs
index 8d9c8893a..eb787ebaa 100644
--- a/src/_common/Globals.cs
+++ b/src/_common/Globals.cs
@@ -7,9 +7,6 @@
namespace Skender.Stock.Indicators;
-/// Technical indicators and overlays. See
-///
-/// the Guide for more information.
public static partial class Indicator
{
private static readonly CultureInfo invCulture = CultureInfo.InvariantCulture;
diff --git a/src/_common/Quotes/Quote.Converters.cs b/src/_common/Quotes/Quote.Converters.cs
index efcc4eb1c..6e3aab774 100644
--- a/src/_common/Quotes/Quote.Converters.cs
+++ b/src/_common/Quotes/Quote.Converters.cs
@@ -1,5 +1,4 @@
using System.Collections.ObjectModel;
-using System.Globalization;
namespace Skender.Stock.Indicators;
diff --git a/src/_common/Results/Result.Syncing.cs b/src/_common/Results/Result.Syncing.cs
index a39b0c9f9..e493182cc 100644
--- a/src/_common/Results/Result.Syncing.cs
+++ b/src/_common/Results/Result.Syncing.cs
@@ -94,7 +94,7 @@ public static IEnumerable SyncIndex(
}
}
- syncMeList.RemoveAll(x => toRemove.Contains(x));
+ syncMeList.RemoveAll(toRemove.Contains);
}
return syncMeList.ToSortedList();
diff --git a/src/m-r/MaEnvelopes/MaEnvelopes.Series.cs b/src/m-r/MaEnvelopes/MaEnvelopes.Series.cs
index ce8776b33..86785811a 100644
--- a/src/m-r/MaEnvelopes/MaEnvelopes.Series.cs
+++ b/src/m-r/MaEnvelopes/MaEnvelopes.Series.cs
@@ -30,7 +30,8 @@ internal static IEnumerable CalcMaEnvelopes(
MaType.WMA => tpList.MaEnvWma(lookbackPeriods, offsetRatio),
_ => throw new ArgumentOutOfRangeException(
- nameof(movingAverageType), movingAverageType,
+ nameof(movingAverageType),
+ movingAverageType,
string.Format(
invCulture,
"Moving Average Envelopes does not support {0}.",
diff --git a/src/m-r/PivotPoints/PivotPoints.Series.cs b/src/m-r/PivotPoints/PivotPoints.Series.cs
index 98b8f5e85..aa660fbc5 100644
--- a/src/m-r/PivotPoints/PivotPoints.Series.cs
+++ b/src/m-r/PivotPoints/PivotPoints.Series.cs
@@ -133,20 +133,11 @@ internal static TPivotPoint GetPivotPointDemark(
decimal open, decimal high, decimal low, decimal close)
where TPivotPoint : IPivotPoint, new()
{
- decimal? x;
-
- if (close < open)
- {
- x = high + (2 * low) + close;
- }
- else if (close > open)
- {
- x = (2 * high) + low + close;
- }
- else // close == open
- {
- x = high + low + (2 * close);
- }
+ decimal? x = close < open
+ ? high + (2 * low) + close
+ : close > open
+ ? (2 * high) + low + close
+ : high + low + (2 * close);
return new TPivotPoint {
PP = x / 4,
@@ -210,9 +201,9 @@ private static int GetWindowNumber(DateTime d, PeriodSize windowSize)
PeriodSize.Day => d.Day,
PeriodSize.OneHour => d.Hour,
_ => throw new ArgumentOutOfRangeException(nameof(windowSize), windowSize,
- string.Format(
- invCulture,
- "Pivot Points does not support PeriodSize of {0}. See documentation for valid options.",
- Enum.GetName(typeof(PeriodSize), windowSize)))
+ string.Format(
+ invCulture,
+ "Pivot Points does not support PeriodSize of {0}. See documentation for valid options.",
+ Enum.GetName(typeof(PeriodSize), windowSize)))
};
}
diff --git a/src/s-z/StdDevChannels/StdDevChannels.Utilities.cs b/src/s-z/StdDevChannels/StdDevChannels.Utilities.cs
index f00a074c1..d3b222d55 100644
--- a/src/s-z/StdDevChannels/StdDevChannels.Utilities.cs
+++ b/src/s-z/StdDevChannels/StdDevChannels.Utilities.cs
@@ -16,7 +16,7 @@ public static IEnumerable Condense(
x.UpperChannel is null
&& x.LowerChannel is null
&& x.Centerline is null
- && x.BreakPoint is false);
+ && !x.BreakPoint);
return resultsList.ToSortedList();
}
diff --git a/tests/Directory.Packages.props b/tests/Directory.Packages.props
new file mode 100644
index 000000000..23e3bd005
--- /dev/null
+++ b/tests/Directory.Packages.props
@@ -0,0 +1,18 @@
+
+
+
+ true
+ false
+ $(NoWarn);NU1507
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/indicators/GlobalSuppressions.cs b/tests/indicators/GlobalSuppressions.cs
index b63914909..4b9624ce0 100644
--- a/tests/indicators/GlobalSuppressions.cs
+++ b/tests/indicators/GlobalSuppressions.cs
@@ -1,8 +1,3 @@
-// This file is used by Code Analysis to maintain SuppressMessage
-// attributes that are applied to this project.
-// Project-level suppressions either have no target or are given
-// a specific target and scoped to a namespace, type, member, etc.
-
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage(
@@ -20,6 +15,11 @@
"SA1311:Static readonly fields should begin with upper-case letter",
Justification = "Acceptable for test project.")]
+[assembly: SuppressMessage(
+ "Maintainability",
+ "CA1515:Consider making public types internal",
+ Justification = "Test projects use public class types.")]
+
[assembly: SuppressMessage(
"Security",
"CA5394:Do not use insecure randomness",
diff --git a/tests/indicators/Tests.Indicators.csproj b/tests/indicators/Tests.Indicators.csproj
index b4d8d0d07..4827c4191 100644
--- a/tests/indicators/Tests.Indicators.csproj
+++ b/tests/indicators/Tests.Indicators.csproj
@@ -1,24 +1,27 @@
-
- net8.0
+
+ net9.0
enable
false
+ true
+
true
latest
AllEnabledByDefault
true
true
true
+
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -32,7 +35,6 @@
Always
-
Always
diff --git a/tests/indicators/a-d/Adx/Adx.Tests.cs b/tests/indicators/a-d/Adx/Adx.Tests.cs
index 81a4c4805..db61a8d23 100644
--- a/tests/indicators/a-d/Adx/Adx.Tests.cs
+++ b/tests/indicators/a-d/Adx/Adx.Tests.cs
@@ -132,10 +132,8 @@ public void Removed()
Assert.AreEqual(34.2987, last.Adx.Round(4));
}
- [TestMethod]
- public void Exceptions() =>
-
- // bad lookback period
- Assert.ThrowsException(() =>
- quotes.GetAdx(1));
+ [TestMethod] // bad lookback period
+ public void Exceptions()
+ => Assert.ThrowsException(
+ () => quotes.GetAdx(1));
}
diff --git a/tests/indicators/s-z/StdDevChannels/StdDevChannels.Tests.cs b/tests/indicators/s-z/StdDevChannels/StdDevChannels.Tests.cs
index ad6abad22..f6eb9e038 100644
--- a/tests/indicators/s-z/StdDevChannels/StdDevChannels.Tests.cs
+++ b/tests/indicators/s-z/StdDevChannels/StdDevChannels.Tests.cs
@@ -77,7 +77,7 @@ public void FullHistory()
Assert.AreEqual(502, results.Count(x => x.Centerline != null));
Assert.AreEqual(502, results.Count(x => x.UpperChannel != null));
Assert.AreEqual(502, results.Count(x => x.LowerChannel != null));
- Assert.AreEqual(501, results.Count(x => x.BreakPoint == false));
+ Assert.AreEqual(501, results.Count(x => !x.BreakPoint));
// sample value
StdDevChannelsResult r1 = results[0];
diff --git a/tests/other/GlobalSuppressions.cs b/tests/other/GlobalSuppressions.cs
new file mode 100644
index 000000000..03782e35e
--- /dev/null
+++ b/tests/other/GlobalSuppressions.cs
@@ -0,0 +1,6 @@
+using System.Diagnostics.CodeAnalysis;
+
+[assembly: SuppressMessage(
+ "Maintainability",
+ "CA1515:Consider making public types internal",
+ Justification = "Test projects use public class types.")]
diff --git a/tests/other/Tests.Other.csproj b/tests/other/Tests.Other.csproj
index 4163be127..f5c7c82a3 100644
--- a/tests/other/Tests.Other.csproj
+++ b/tests/other/Tests.Other.csproj
@@ -1,22 +1,25 @@
-
- net8.0
+
+ net9.0
enable
false
+ true
+
true
latest
AllEnabledByDefault
true
true
true
+
-
-
-
+
+
+
diff --git a/tests/performance/GlobalSuppressions.cs b/tests/performance/GlobalSuppressions.cs
index a4a01ae24..3f8807f6f 100644
--- a/tests/performance/GlobalSuppressions.cs
+++ b/tests/performance/GlobalSuppressions.cs
@@ -1,11 +1,16 @@
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage(
- "Performance",
- "CA1822:Mark members as static",
+ "Design",
+ "CA1051:Do not declare visible instance fields",
Justification = "Required for BenchmarkDotNet")]
[assembly: SuppressMessage(
- "Design",
- "CA1051:Do not declare visible instance fields",
+ "Maintainability",
+ "CA1515:Consider making public types internal",
+ Justification = "Test projects use public class types.")]
+
+[assembly: SuppressMessage(
+ "Performance",
+ "CA1822:Mark members as static",
Justification = "Required for BenchmarkDotNet")]
diff --git a/tests/performance/Tests.Performance.csproj b/tests/performance/Tests.Performance.csproj
index c9222980c..d94448e0d 100644
--- a/tests/performance/Tests.Performance.csproj
+++ b/tests/performance/Tests.Performance.csproj
@@ -1,20 +1,23 @@
-
- net8.0
+
+ net9.0
enable
Exe
+ true
+
true
latest
AllEnabledByDefault
true
true
true
+
-
+