Remove timeframe from strategy (#13)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user