* Refactoring TradingBotBase.cs + clean architecture * Fix basic tests * Fix tests * Fix workers * Fix open positions * Fix closing position stucking the grain * Fix comments * Refactor candle handling to use IReadOnlyList for chronological order preservation across various components
21 lines
553 B
C#
21 lines
553 B
C#
using Managing.Domain.Trades;
|
|
using MediatR;
|
|
|
|
namespace Managing.Application.Trading.Commands
|
|
{
|
|
public class CloseFuturesPositionCommand : IRequest<Position>
|
|
{
|
|
public CloseFuturesPositionCommand(Position position, int accountId, decimal? executionPrice = null)
|
|
{
|
|
Position = position;
|
|
AccountId = accountId;
|
|
ExecutionPrice = executionPrice;
|
|
}
|
|
|
|
public Position Position { get; }
|
|
public int AccountId { get; }
|
|
public decimal? ExecutionPrice { get; set; }
|
|
}
|
|
}
|
|
|