Remove timeframe from strategy (#13)

This commit is contained in:
Oda
2025-02-26 17:24:59 +07:00
committed by GitHub
parent 298b666a0b
commit 4302bb8435
39 changed files with 299 additions and 288 deletions

View File

@@ -19,9 +19,9 @@ namespace Managing.Application.Scenarios
_tradingService = tradingService;
}
public Scenario CreateScenario(string name, List<string> strategies)
public Scenario CreateScenario(string name, List<string> strategies, int? loopbackPeriod = 1)
{
var scenario = new Scenario(name);
var scenario = new Scenario(name, loopbackPeriod);
foreach (var strategy in strategies)
{
@@ -43,20 +43,18 @@ namespace Managing.Application.Scenarios
public Strategy CreateStrategy(
StrategyType type,
Timeframe timeframe,
string name,
string name,
int? period = null,
int? fastPeriods = null,
int? slowPeriods = null,
int? signalPeriods = null,
double? multiplier = null,
int? stochPeriods = null,
int? smoothPeriods = null,
int? smoothPeriods = null,
int? cyclePeriods = null)
{
var strategy = ScenarioHelpers.BuildStrategy(
type,
timeframe,
name,
period,
fastPeriods,
@@ -141,4 +139,4 @@ namespace Managing.Application.Scenarios
return true;
}
}
}
}