Skip to content

Commit

Permalink
add SMI default values (#1081)
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Skender <[email protected]>
  • Loading branch information
DaveSkender authored Sep 24, 2023
1 parent 36720d1 commit 737f536
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![GitHub Stars](https://img.shields.io/github/stars/DaveSkender/Stock.Indicators?logo=github&label=Stars)](https://github.com/DaveSkender/Stock.Indicators)
[![NuGet package](https://img.shields.io/nuget/v/skender.stock.indicators?color=blue&logo=NuGet&label=Nuget)](https://www.nuget.org/packages/Skender.Stock.Indicators)
[![Nuget](https://img.shields.io/nuget/dt/skender.stock.indicators?logo=NuGet&label=Downloads)](https://www.nuget.org/packages/Skender.Stock.Indicators)
[![NuGet](https://img.shields.io/nuget/dt/skender.stock.indicators?logo=NuGet&label=Downloads)](https://www.nuget.org/packages/Skender.Stock.Indicators)
[![code coverage](https://img.shields.io/azure-devops/coverage/skender/stock.indicators/21/main?logo=AzureDevOps&label=Test%20Coverage)](https://dev.azure.com/skender/Stock.Indicators/_build/latest?definitionId=21&branchName=main&view=codecoverage-tab)

# Stock Indicators for .NET
Expand Down
24 changes: 13 additions & 11 deletions docs/GemFile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@ GIT
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.6)
activesupport (7.0.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.1.1)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.23.9)
commonmarker (0.23.10)
concurrent-ruby (1.2.2)
cssminify2 (2.0.1)
dnsruby (1.70.0)
Expand All @@ -30,15 +31,16 @@ GEM
http_parser.rb (~> 0)
ethon (0.16.0)
ffi (>= 1.15.0)
execjs (2.8.1)
faraday (2.7.9)
execjs (2.9.1)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
faraday-retry (2.2.0)
faraday (~> 2.0)
ffi (1.15.5)
ffi (1.15.5-x64-mingw-ucrt)
ffi (1.16.1)
ffi (1.16.1-x64-mingw-ucrt)
forwardable-extended (2.6.0)
gemoji (3.0.1)
github-pages (228)
Expand Down Expand Up @@ -232,10 +234,10 @@ GEM
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.18.1)
nokogiri (1.15.2-x64-mingw-ucrt)
minitest (5.20.0)
nokogiri (1.15.4-x64-mingw-ucrt)
racc (~> 1.4)
nokogiri (1.15.2-x86_64-linux)
nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
Expand All @@ -248,7 +250,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rexml (3.2.6)
rouge (3.26.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand Down
6 changes: 3 additions & 3 deletions docs/_indicators/Smi.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ IEnumerable<SmiResult> results =

## Parameters

**`lookbackPeriods`** _`int`_ - Lookback period (`N`) for the stochastic. Must be greater than 0.
**`lookbackPeriods`** _`int`_ - Lookback period (`N`) for the stochastic. Must be greater than 0. Default is 13.

**`firstSmoothPeriods`** _`int`_ - First smoothing factor lookback. Must be greater than 0.
**`firstSmoothPeriods`** _`int`_ - First smoothing factor lookback. Must be greater than 0. Default is 25.

**`secondSmoothPeriods`** _`int`_ - Second smoothing factor lookback. Must be greater than 0.
**`secondSmoothPeriods`** _`int`_ - Second smoothing factor lookback. Must be greater than 0. Default is 2.

**`signalPeriods`** _`int`_ - EMA of SMI lookback periods. Must be greater than 0. Default is 3.

Expand Down
Binary file modified docs/assets/charts/Smi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/s-z/Smi/Smi.Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ public static partial class Indicator
///
public static IEnumerable<SmiResult> GetSmi<TQuote>(
this IEnumerable<TQuote> quotes,
int lookbackPeriods,
int firstSmoothPeriods,
int secondSmoothPeriods,
int lookbackPeriods = 13,
int firstSmoothPeriods = 25,
int secondSmoothPeriods = 2,
int signalPeriods = 3)
where TQuote : IQuote => quotes
.ToQuoteD()
Expand Down
6 changes: 3 additions & 3 deletions tests/external/Tests.Other.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
6 changes: 3 additions & 3 deletions tests/indicators/Tests.Indicators.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/Tests.Performance.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.8" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 737f536

Please sign in to comment.