Skip to content

Commit

Permalink
docs: Bump examples package ref (#1276)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender authored Nov 28, 2024
1 parent f8124dc commit e3e3a57
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 189 deletions.
25 changes: 10 additions & 15 deletions docs/examples/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,29 @@ root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

indent_style = space
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]

[*.{cs,vb}]
tab_width = 4
indent_size = 4
end_of_line = lf

#### Naming styles ####
# File headers are disabled
file_header_template = unset

# Naming styles
# Organize 'using' directives
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false

# Allow singular 'using' directive
dotnet_style_namespace_match_folder = false:none

[*.cs]
# Don't require accessibility modifiers
dotnet_diagnostic.IDE0058.severity = none
2 changes: 1 addition & 1 deletion docs/examples/Backtest/Backtest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Skender.Stock.Indicators" Version="2.5.1" />
<PackageReference Include="Skender.Stock.Indicators" Version="2.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ConsoleApp/ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Skender.Stock.Indicators" Version="2.5.1" />
<PackageReference Include="Skender.Stock.Indicators" Version="2.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Skender.Stock.Indicators" Version="2.5.1" />
<PackageReference Include="Skender.Stock.Indicators" Version="2.6.0" />
</ItemGroup>

</Project>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Skender.Stock.Indicators" Version="2.5.1" />
<PackageReference Include="Skender.Stock.Indicators" Version="2.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CustomIndicators\CustomIndicatorsLibrary.csproj" />
<ProjectReference Include="..\CustomIndicatorsLibrary\CustomIndicatorsLibrary.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 0 additions & 18 deletions docs/examples/CustomIndicatorsUsage/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,6 @@ public static void Main()
// only showing first 30 records for brevity
Console.WriteLine($"ATR WMA on {r.Date:u} was ${r.AtrWma:N3}");
}

// optional: demo of a converter (nulls to NaN)

Console.WriteLine();
Console.WriteLine("ATR WMA Results with NaN (optional) -------");

// tip: converting ToList() and using For loops is faster to iterate
List<AtrWmaResult> resultsList = results
.Take(30)
.ToList();

for (int i = 0; i < resultsList.Count; i++)
{
AtrWmaResult r = resultsList[i];
r.AtrWma = r.AtrWma.Null2NaN();

Console.WriteLine($"ATR WMA on {r.Date:u} was ${r.AtrWma:N3}");
}
}

private static Collection<Quote> GetQuotesFromFeed()
Expand Down
8 changes: 1 addition & 7 deletions docs/examples/Examples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "ConsoleApp\Co
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Backtest", "Backtest\Backtest.csproj", "{21707592-8CB6-40DB-8183-E1D107559EDB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomIndicatorsLibrary", "CustomIndicators\CustomIndicatorsLibrary.csproj", "{D201089E-E9F6-4A67-A763-4164C8318E04}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomIndicatorsLibrary", "CustomIndicatorsLibrary\CustomIndicatorsLibrary.csproj", "{D201089E-E9F6-4A67-A763-4164C8318E04}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomIndicatorsUsage", "CustomIndicatorsUsage\CustomIndicatorsUsage.csproj", "{4C6528AB-8311-4F10-99D2-83A2AB2DFB53}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ObserveStream", "ObserveStream\ObserveStream.csproj", "{5FAD383B-DFCD-42FD-A847-53D772876595}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UseQuoteApi", "UseQuoteApi\UseQuoteApi.csproj", "{E6B2E0AE-6457-47F3-9BA5-01F4AA84118A}"
EndProject
Global
Expand All @@ -37,10 +35,6 @@ Global
{4C6528AB-8311-4F10-99D2-83A2AB2DFB53}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C6528AB-8311-4F10-99D2-83A2AB2DFB53}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C6528AB-8311-4F10-99D2-83A2AB2DFB53}.Release|Any CPU.Build.0 = Release|Any CPU
{5FAD383B-DFCD-42FD-A847-53D772876595}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5FAD383B-DFCD-42FD-A847-53D772876595}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FAD383B-DFCD-42FD-A847-53D772876595}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FAD383B-DFCD-42FD-A847-53D772876595}.Release|Any CPU.Build.0 = Release|Any CPU
{E6B2E0AE-6457-47F3-9BA5-01F4AA84118A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6B2E0AE-6457-47F3-9BA5-01F4AA84118A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6B2E0AE-6457-47F3-9BA5-01F4AA84118A}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
14 changes: 0 additions & 14 deletions docs/examples/ObserveStream/ObserveStream.csproj

This file was deleted.

125 changes: 0 additions & 125 deletions docs/examples/ObserveStream/Program.cs

This file was deleted.

5 changes: 2 additions & 3 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ layout: page

# {{ page.title }}

To help you get started, here are a few minimalist [.NET 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) C# projects that you can review. They are complete working examples.
To help you get started, here are a few minimalist [.NET 9.0](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) C# projects that you can review. They are complete working examples.

- `ConsoleApp` is a minimalist example of how to use the library (start here)
- `Backtest` is a slightly more complicated example of how to analyze results
- `CustomIndicatorsLibrary` shows how you can [create your own custom indicators]({{site.baseurl}}/custom-indicators/#content)
- `CustomIndicatorsUsage` shows how you'd use a custom indicator just like any other in the main library
- `ObserveStream` [preview] shows how you'd use live quotes from WebSocket, using the Alpaca SDK for .NET
- `CustomIndicatorsUsage` shows how you'd use custom indicators just like any other in the main library
- `UseQuoteApi` shows how you'd get quotes from an API quote source, using the Alpaca SDK for .NET

For more information on how to use this library overall, see the [Guide and Pro Tips]({{site.baseurl}}/guide/#content).
Expand Down
Binary file modified docs/examples/Skender.Stock.Indicators-Examples.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/examples/UseQuoteApi/UseQuoteApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Alpaca.Markets" Version="7.1.3" />
<PackageReference Include="Skender.Stock.Indicators" Version="2.5.1" />
<PackageReference Include="Alpaca.Markets" Version="7.1.4" />
<PackageReference Include="Skender.Stock.Indicators" Version="2.6.0" />
</ItemGroup>

</Project>

0 comments on commit e3e3a57

Please sign in to comment.