Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (20 sloc) 562 Bytes
using System;
namespace Trader.Domain.Model
{
public class TradesPosition
{
private readonly int _count;
public TradesPosition(decimal buy, decimal sell, int count)
{
Buy = buy;
Sell = sell;
_count = count;
Position = Buy - Sell;
}
public bool Negative => Position < 0;
public decimal Position { get; }
public decimal Buy { get; }
public decimal Sell { get; }
public string CountText => "Order".Pluralise(_count);
}
}