Skip to content

Commit

Permalink
net7.0 port, switched to central package management
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredthirsk committed Nov 27, 2022
1 parent bca6c9b commit bf9e3cd
Show file tree
Hide file tree
Showing 17 changed files with 156 additions and 96 deletions.
54 changes: 54 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Alexinea.ZeroFormatter" Version="1.6.4" />
<PackageVersion Include="Alexinea.ZeroFormatter.Interfaces" Version="1.6.4" />
<PackageVersion Include="Binance.Net" Version="8.0.9" />
<PackageVersion Include="DeferredEvents" Version="1.0.5" />
<PackageVersion Include="Flurl" Version="2.7.1" />
<PackageVersion Include="Flurl.Http" Version="2.3.1" />
<PackageVersion Include="FTX.Net" Version="1.0.6" />
<PackageVersion Include="K4os.Compression.LZ4.Streams" Version="1.2.16" />
<PackageVersion Include="McMaster.Extensions.Hosting.CommandLine" Version="4.0.1" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
<PackageVersion Include="Microsoft.Orleans.Core" Version="7.0.0" />
<PackageVersion Include="Newtonsoft.Json" Version="12.0.3" />
<PackageVersion Include="NLog" Version="5.0.0-beta11" />
<PackageVersion Include="Oakton" Version="4.5.0" />
<PackageVersion Include="QuantConnect.Indicators" Version="2.5.13897" />
<PackageVersion Include="StackExchange.Redis" Version="2.2.4" />
<PackageVersion Include="System.Collections.Concurrent" Version="4.3.0" />
<PackageVersion Include="System.Collections.Immutable" Version="7.0.0" />
<PackageVersion Include="System.IO" Version="4.3.0" />
<PackageVersion Include="System.ObjectModel" Version="4.3.0" />
<PackageVersion Include="System.Reactive" Version="5.0.0" />
<PackageVersion Include="System.Reactive.Linq" Version="5.0.0" />
<PackageVersion Include="System.Reflection" Version="4.3.0" />
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<PackageVersion Include="System.Runtime.Extensions" Version="4.3.1" />
<PackageVersion Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageVersion Include="System.Threading.Thread" Version="4.3.0" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="Utf8Json" Version="1.3.7" />
<PackageVersion Include="Winton.Extensions.Configuration.Consul" Version="3.2.0" />
<PackageVersion Include="YamlDotNet" Version="11.2.1" />
<PackageVersion Include="ZeroFormatter.Analyzer" Version="1.1.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageVersion Include="Google.ProtocolBuffers" Version="2.4.1.555" />
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.1.0" />
<PackageVersion Include="System.Text.Encoding.Extensions" Version="4.0.11" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -21,9 +21,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
<PackageReference Include="System.Runtime.Extensions" Version="4.3.1" />
<PackageReference Include="Alexinea.ZeroFormatter.Interfaces" Version="1.6.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="System.Runtime.Extensions" />
<PackageReference Include="Alexinea.ZeroFormatter.Interfaces" />

</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -21,9 +21,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" />
</ItemGroup>

</Project>
18 changes: 9 additions & 9 deletions src/LionFire.Trading.Agent/LionFire.Trading.Agent.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -22,14 +22,14 @@


<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NLog" Version="5.0.0-beta11" />
<PackageReference Include="System.IO" Version="4.3.0" />
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NLog" />
<PackageReference Include="System.IO" />
<PackageReference Include="System.Threading.Thread" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions src/LionFire.Trading.Cli/LionFire.Trading.Cli.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -9,10 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="McMaster.Extensions.Hosting.CommandLine" Version="4.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Oakton" Version="4.5.0" />
<PackageReference Include="Winton.Extensions.Configuration.Consul" Version="3.2.0" />
<PackageReference Include="McMaster.Extensions.Hosting.CommandLine" />
<PackageReference Include="Microsoft.Extensions.Hosting" />
<PackageReference Include="Oakton" />
<PackageReference Include="Winton.Extensions.Configuration.Consul" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -7,10 +7,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Collections.Immutable" Version="6.0.0" />
<PackageReference Include="System.Collections.Immutable" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
<PackageReference Include="System.Threading.Thread" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -8,9 +8,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Core" Version="3.6.1" />
<PackageReference Include="McMaster.Extensions.Hosting.CommandLine" Version="4.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Microsoft.Orleans.Core" />
<PackageReference Include="McMaster.Extensions.Hosting.CommandLine" />
<PackageReference Include="Microsoft.Extensions.Hosting" />

</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -8,15 +8,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Alexinea.ZeroFormatter" Version="1.6.4" />
<PackageReference Include="Binance.Net" Version="8.0.9" />
<PackageReference Include="FTX.Net" Version="1.0.6" />
<PackageReference Include="K4os.Compression.LZ4.Streams" Version="1.2.16" />
<PackageReference Include="McMaster.Extensions.Hosting.CommandLine" Version="4.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Oakton" Version="4.5.0" />
<PackageReference Include="YamlDotNet" Version="11.2.1" />
<PackageReference Include="ZeroFormatter.Analyzer" Version="1.1.1" />
<PackageReference Include="Alexinea.ZeroFormatter" />
<PackageReference Include="Binance.Net" />
<PackageReference Include="FTX.Net" />
<PackageReference Include="K4os.Compression.LZ4.Streams" />
<PackageReference Include="McMaster.Extensions.Hosting.CommandLine" />
<PackageReference Include="Microsoft.Extensions.Hosting" />
<PackageReference Include="Oakton" />
<PackageReference Include="YamlDotNet" />
<PackageReference Include="ZeroFormatter.Analyzer" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/LionFire.Trading.Shared/Backtesting/BacktestStats.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

using System;

namespace LionFire.Trading.Backtesting;

public static class BacktestStats
Expand Down
8 changes: 4 additions & 4 deletions src/LionFire.Trading.Shared/Bots/BotBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1415,10 +1415,10 @@ double GetFitness(GetFitnessArgs args)
End = EndDate.Value,

AverageTrade = args.AverageTrade,
AverageTradePerVolume = args.AverageTradePerVolume,
//AverageTradePerVolume = args.AverageTradePerVolume, // Where did this come from?
Equity = args.Equity,
//History
LosingTrades = args.LosingTrades,
LosingTrades =(int) args.LosingTrades,
MaxBalanceDrawdown = args.MaxBalanceDrawdown,
MaxBalanceDrawdownPercentages = args.MaxBalanceDrawdownPercentages,
MaxEquityDrawdown = args.MaxEquityDrawdown,
Expand All @@ -1429,8 +1429,8 @@ double GetFitness(GetFitnessArgs args)
ProfitFactor = args.ProfitFactor,
SharpeRatio = args.SharpeRatio,
SortinoRatio = args.SortinoRatio,
TotalTrades = args.TotalTrades,
WinningTrades = args.WinningTrades,
TotalTrades = (int)args.TotalTrades,
WinningTrades = (int)args.WinningTrades,
};

var duration = EndDate.Value - StartDate.Value; // Slight optimization of backtestResult.Duration
Expand Down
6 changes: 5 additions & 1 deletion src/LionFire.Trading.Triggers/PriceTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;


Expand Down Expand Up @@ -62,6 +63,9 @@ public Task Start()
throw new NotImplementedException();
}


public Task StartAsync(CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -17,10 +17,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
<PackageReference Include="System.Collections.Concurrent" Version="4.3.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="StackExchange.Redis" />
<PackageReference Include="System.Collections.Concurrent" />
</ItemGroup>

</Project>
28 changes: 14 additions & 14 deletions src/LionFire.Trading/LionFire.Trading - Copy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.7" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="3.1.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.7" />
<PackageReference Include="System.ObjectModel" Version="4.3.0" />
<PackageReference Include="System.Collections.Concurrent" Version="4.3.0" />
<PackageReference Include="System.Reflection" Version="4.3.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Reactive" />
<PackageReference Include="System.Reflection.TypeExtensions" />
<PackageReference Include="System.Text.Encoding.Extensions" />
<PackageReference Include="System.Threading.Thread" />
<PackageReference Include="Microsoft.Extensions.Options" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" />
<PackageReference Include="System.ObjectModel" />
<PackageReference Include="System.Collections.Concurrent" />
<PackageReference Include="System.Reflection" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>$(DefineConstants);SanityChecks</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.1.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.0.11" />
<PackageReference Include="System.Reflection.TypeExtensions" />
<PackageReference Include="System.Text.Encoding.Extensions" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
Expand Down
Loading

0 comments on commit bf9e3cd

Please sign in to comment.