Position management (#12)
* Update position worker * Update todo * Update todo * Update worker base url
This commit is contained in:
@@ -238,6 +238,8 @@ ________________________________________________________________________________
|
|||||||
- [ ] Add Tyk API Gateway for rate limit between n8n and Managing API
|
- [ ] Add Tyk API Gateway for rate limit between n8n and Managing API
|
||||||
- [ ] New database Postgre for N8N and Botpress (agent profiles, built strategies, stats)
|
- [ ] New database Postgre for N8N and Botpress (agent profiles, built strategies, stats)
|
||||||
|
|
||||||
|
- [ ] Deploy database for Chat and Agent Profiles
|
||||||
|
|
||||||
_____________________________________________________________________________________________________________
|
_____________________________________________________________________________________________________________
|
||||||
|
|
||||||
# Front-end
|
# Front-end
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using OpenApiSecurityScheme = NSwag.OpenApiSecurityScheme;
|
|||||||
|
|
||||||
// Builder
|
// Builder
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
builder.WebHost.UseUrls("http://localhost:5001");
|
// builder.WebHost.UseUrls("http://localhost:5001");
|
||||||
builder.Configuration.SetBasePath(AppContext.BaseDirectory);
|
builder.Configuration.SetBasePath(AppContext.BaseDirectory);
|
||||||
builder.Configuration.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
builder.Configuration.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||||
.AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json");
|
.AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json");
|
||||||
|
|||||||
@@ -163,12 +163,14 @@ public class TradingBot : Bot, ITradingBot
|
|||||||
Logger.LogInformation(
|
Logger.LogInformation(
|
||||||
$"Time : {DateTime.Now} - Server time {DateTime.Now.ToUniversalTime()} - Bot : {Name} - Type {BotType} - Ticker : {Ticker}");
|
$"Time : {DateTime.Now} - Server time {DateTime.Now.ToUniversalTime()} - Bot : {Name} - Type {BotType} - Ticker : {Ticker}");
|
||||||
|
|
||||||
var previousCandleCount = OptimizedCandles.Count;
|
var previousLastCandle = OptimizedCandles.LastOrDefault();
|
||||||
|
|
||||||
if (!IsForBacktest)
|
if (!IsForBacktest)
|
||||||
await UpdateCandles();
|
await UpdateCandles();
|
||||||
|
|
||||||
if (OptimizedCandles.Count > previousCandleCount || IsForBacktest)
|
var currentLastCandle = OptimizedCandles.LastOrDefault();
|
||||||
|
|
||||||
|
if (currentLastCandle != previousLastCandle || IsForBacktest)
|
||||||
await UpdateSignals(OptimizedCandles);
|
await UpdateSignals(OptimizedCandles);
|
||||||
else
|
else
|
||||||
Logger.LogInformation($"No need to update signals for {Ticker}");
|
Logger.LogInformation($"No need to update signals for {Ticker}");
|
||||||
|
|||||||
Reference in New Issue
Block a user