Remove timeframe from strategy (#13)
This commit is contained in:
@@ -206,7 +206,7 @@ public class BotController : ControllerBase
|
||||
Timeframe = item.Timeframe,
|
||||
Ticker = item.Ticker,
|
||||
AccountName = item.AccountName,
|
||||
Scenario = item.Scenario,
|
||||
Scenario = item.ScenarioName,
|
||||
IsForWatchingOnly = item.IsForWatchingOnly,
|
||||
BotType = item.BotType,
|
||||
MoneyManagement = item.MoneyManagement
|
||||
|
||||
@@ -46,9 +46,9 @@ public class ScenarioController : ControllerBase
|
||||
/// <param name="strategies">A list of strategy names to include in the scenario.</param>
|
||||
/// <returns>The created scenario.</returns>
|
||||
[HttpPost]
|
||||
public ActionResult<Scenario> CreateScenario(string name, List<string> strategies)
|
||||
public ActionResult<Scenario> CreateScenario(string name, List<string> strategies, int? loopbackPeriod = null)
|
||||
{
|
||||
return Ok(_scenarioService.CreateScenario(name, strategies));
|
||||
return Ok(_scenarioService.CreateScenario(name, strategies, loopbackPeriod));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -92,7 +92,6 @@ public class ScenarioController : ControllerBase
|
||||
[Route("strategy")]
|
||||
public ActionResult<Strategy> CreateStrategy(
|
||||
StrategyType strategyType,
|
||||
Timeframe timeframe,
|
||||
string name,
|
||||
int? period = null,
|
||||
int? fastPeriods = null,
|
||||
@@ -105,7 +104,6 @@ public class ScenarioController : ControllerBase
|
||||
{
|
||||
return Ok(_scenarioService.CreateStrategy(
|
||||
strategyType,
|
||||
timeframe,
|
||||
name,
|
||||
period,
|
||||
fastPeriods,
|
||||
|
||||
Reference in New Issue
Block a user