Documentation ¶
Index ¶
- type Status
- type Trade
- func (t *Trade) BenefitPercentage() float64
- func (t *Trade) Bought(op *operation.Operation)
- func (t *Trade) Capital() mm.Value
- func (t *Trade) Close(op *operation.Operation)
- func (t *Trade) Net() mm.Value
- func (t *Trade) Open(op *operation.Operation)
- func (t *Trade) PayedDividend(d mm.Value)
- func (t *Trade) Sold(op *operation.Operation)
- func (t *Trade) WeightedAverageBuyPrice() mm.Value
- func (t *Trade) WeightedAverageSellPrice() mm.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trade ¶
type Trade struct { ID uuid.UUID Number int OpenedAt time.Time Buys mm.Value BuyAmount float64 ClosedAt time.Time Sells mm.Value SellAmount float64 Amount float64 Dividend mm.Value Status Status CloseCapital mm.Value CloseNet mm.Value Stock *stock.Stock Operations []*operation.Operation // Rate currency conversion CapitalRate float64 }
func (*Trade) BenefitPercentage ¶
func (*Trade) PayedDividend ¶
func (t *Trade) PayedDividend(d mm.Value)
func (*Trade) WeightedAverageBuyPrice ¶
func (t *Trade) WeightedAverageBuyPrice() mm.Value
func (*Trade) WeightedAverageSellPrice ¶
func (t *Trade) WeightedAverageSellPrice() mm.Value
Click to show internal directories.
Click to hide internal directories.