docker files fixes from liaqat
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections;
|
||||
|
||||
[BsonCollection("Accounts")]
|
||||
public class AccountDto : Document
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public Exchanges Exchanges { get; set; }
|
||||
public string Key { get; set; }
|
||||
public string Secret { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections
|
||||
{
|
||||
[BsonCollection("Backtests")]
|
||||
public class BacktestDto : Document
|
||||
{
|
||||
public decimal FinalPnl { get; set; }
|
||||
public int WinRate { get; set; }
|
||||
public decimal GrowthPercentage { get; set; }
|
||||
public decimal HodlPercentage { get; set; }
|
||||
public string Ticker { get; set; }
|
||||
public string Scenario { get; set; }
|
||||
public List<PositionDto> Positions { get; set; }
|
||||
public List<SignalDto> Signals { get; set; }
|
||||
public Timeframe Timeframe { get; set; }
|
||||
public RiskLevel RiskLevel { get; set; }
|
||||
public string AccountName { get; set; }
|
||||
public List<CandleDto> Candles { get; set; }
|
||||
public BotType BotType { get; set; }
|
||||
}
|
||||
}
|
||||
28
src/Managing.Infrastructure.MongoDb/Collections/CandleDto.cs
Normal file
28
src/Managing.Infrastructure.MongoDb/Collections/CandleDto.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections
|
||||
{
|
||||
[BsonCollection("Candles")]
|
||||
public class CandleDto : Document
|
||||
{
|
||||
public Exchanges Exchange { get; set; }
|
||||
public Timeframe Timeframe { get; set; }
|
||||
public string Ticker { get; set; }
|
||||
[BsonDateTimeOptions]
|
||||
public DateTime OpenTime { get; set; }
|
||||
[BsonDateTimeOptions]
|
||||
public DateTime CloseTime { get; set; }
|
||||
public decimal Open { get; set; }
|
||||
public decimal Close { get; set; }
|
||||
public decimal High { get; set; }
|
||||
public decimal Low { get; set; }
|
||||
public decimal BaseVolume { get; set; }
|
||||
public decimal QuoteVolume { get; set; }
|
||||
public int TradeCount { get; set; }
|
||||
public decimal TakerBuyBaseVolume { get; set; }
|
||||
public decimal TakerBuyQuoteVolume { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections
|
||||
{
|
||||
[BsonCollection("MoneyManagement")]
|
||||
public class MoneyManagementDto : Document
|
||||
{
|
||||
public Timeframe Timeframe { get; set; }
|
||||
public RiskLevel RiskLevel { get; set; }
|
||||
public decimal BalanceAtRisk { get; set; }
|
||||
public decimal StopLoss { get; set; }
|
||||
public decimal TakeProfit { get; set; }
|
||||
public decimal QuantityTakeProfit { get; set; }
|
||||
public decimal Leverage { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections
|
||||
{
|
||||
[BsonCollection("Positions")]
|
||||
public class PositionDto : Document
|
||||
{
|
||||
[BsonDateTimeOptions]
|
||||
public DateTime Date { get; set; }
|
||||
public TradeDto Open { get; set; }
|
||||
public TradeDto StopLoss { get; set; }
|
||||
public TradeDto TakeProfit1 { get; set; }
|
||||
public TradeDto TakeProfit2 { get; set; }
|
||||
public decimal ProfitAndLoss { get; set; }
|
||||
public TradeDirection OriginDirection { get; set; }
|
||||
public string Identifier { get; set; }
|
||||
public TradeStatus Status { get; set; }
|
||||
public string SignalIdentifier { get; set; }
|
||||
public string AccountName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections
|
||||
{
|
||||
[BsonCollection("Scenarios")]
|
||||
public class ScenarioDto : Document
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public List<StrategyDto> Strategies { get; set; }
|
||||
}
|
||||
}
|
||||
20
src/Managing.Infrastructure.MongoDb/Collections/SignalDto.cs
Normal file
20
src/Managing.Infrastructure.MongoDb/Collections/SignalDto.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections
|
||||
{
|
||||
[BsonCollection("Signals")]
|
||||
public class SignalDto : Document
|
||||
{
|
||||
public TradeDirection Direction { get; set; }
|
||||
public Confidence Confidence { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public CandleDto Candle { get; set; }
|
||||
public string Identifier { get; set; }
|
||||
public string Ticker { get; set; }
|
||||
public SignalStatus Status { get; set; }
|
||||
public Timeframe Timeframe { get; set; }
|
||||
public StrategyType Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections
|
||||
{
|
||||
[BsonCollection("Strategies")]
|
||||
public class StrategyDto : Document
|
||||
{
|
||||
public StrategyType Type { get; set; }
|
||||
public Timeframe Timeframe { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int? Period { get; set; }
|
||||
public int? FastPeriods { get; set; }
|
||||
public int? SlowPeriods { get; set; }
|
||||
public int? SignalPeriods { get; set; }
|
||||
public double? Multiplier { get; set; }
|
||||
public int? StochPeriods { get; set; }
|
||||
public int? SmoothPeriods { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections;
|
||||
|
||||
[BsonCollection("TopVolumeTickers")]
|
||||
public class TopVolumeTickerDto : Document
|
||||
{
|
||||
public Ticker Ticker { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public decimal Volume { get; set; }
|
||||
public int Rank { get; set; }
|
||||
public Exchanges Exchange { get; set; }
|
||||
}
|
||||
24
src/Managing.Infrastructure.MongoDb/Collections/TradeDto.cs
Normal file
24
src/Managing.Infrastructure.MongoDb/Collections/TradeDto.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections
|
||||
{
|
||||
[BsonCollection("Trades")]
|
||||
public class TradeDto : Document
|
||||
{
|
||||
[BsonDateTimeOptions]
|
||||
public DateTime Date { get; set; }
|
||||
public TradeDirection Direction { get; set; }
|
||||
public TradeStatus Status { get; set; }
|
||||
public TradeType TradeType { get; set; }
|
||||
public string Ticker { get; set; }
|
||||
public decimal Fee { get; set; }
|
||||
public decimal Quantity { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public decimal Leverage { get; set; }
|
||||
public string ExchangeOrderId { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
15
src/Managing.Infrastructure.MongoDb/Collections/WorkerDto.cs
Normal file
15
src/Managing.Infrastructure.MongoDb/Collections/WorkerDto.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Managing.Infrastructure.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.MongoDb.Configurations;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.MongoDb.Collections;
|
||||
|
||||
[BsonCollection("Workers")]
|
||||
public class WorkerDto : Document
|
||||
{
|
||||
public WorkerType WorkerType { get; set; }
|
||||
public DateTime StartTime { get; set; }
|
||||
public DateTime? LastRunTime { get; set; }
|
||||
public int ExecutionCount { get; set; }
|
||||
public TimeSpan Delay { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user