Global fix (#9)

* Fix time for candle

* Fix out ouf range

* Fix pnl, fix custom money management

* Clean a bit
This commit is contained in:
Oda
2025-02-04 14:59:39 +07:00
committed by GitHub
parent ff0433c349
commit 0987fa76cf
26 changed files with 153 additions and 139 deletions

View File

@@ -6,18 +6,18 @@ namespace Managing.Api.Workers.Workers;
public class PricesFiveMinutesWorker : PricesBaseWorker<PricesFiveMinutesWorker>
{
public PricesFiveMinutesWorker(
ILogger<PricesFiveMinutesWorker> logger,
IPricesService pricesService,
IStatisticService statisticService,
IWorkerService workerService) : base(
logger,
pricesService,
workerService,
statisticService,
TimeSpan.FromMinutes(2.5),
WorkerType.PriceFiveMinutes,
Timeframe.FiveMinutes
ILogger<PricesFiveMinutesWorker> logger,
IPricesService pricesService,
IStatisticService statisticService,
IWorkerService workerService) : base(
logger,
pricesService,
workerService,
statisticService,
TimeSpan.FromMinutes(1),
WorkerType.PriceFiveMinutes,
Timeframe.FiveMinutes
)
{
}
}
}

View File

@@ -12,15 +12,15 @@ public class SpotlightWorker : BaseWorker<SpotlightWorker>
ILogger<SpotlightWorker> logger,
IWorkerService workerService,
IStatisticService statisticService) : base(
Enums.WorkerType.Spotlight,
logger,
TimeSpan.FromMinutes(5),
workerService)
Enums.WorkerType.Spotlight,
logger,
TimeSpan.FromMinutes(5),
workerService)
{
_statisticService = statisticService;
}
protected async override Task Run(CancellationToken cancellationToken)
protected override async Task Run(CancellationToken cancellationToken)
{
try
{
@@ -32,4 +32,4 @@ public class SpotlightWorker : BaseWorker<SpotlightWorker>
throw;
}
}
}
}