Documentation ¶
Overview ¶
Package order allows to calculate future price projections, broker fees and risk figures
Index ¶
- func StopLoss(actual, stop float64) error
- type HigherLowerError
- type Order
- func (o *Order) Amount() (amount int64)
- func (o *Order) Even(broker string) (even decimal.Decimal, err error)
- func (o *Order) Gain(broker string) (gain decimal.Decimal, err error)
- func (o *Order) Loss(broker string) (loss decimal.Decimal, err error)
- func (o *Order) RiskRewardRatio() (rrr decimal.Decimal)
- func (o *Order) TotalCommission(brokerAlias string) (commission decimal.Decimal, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HigherLowerError ¶
type HigherLowerError struct {
// contains filtered or unexported fields
}
HigherLowerError represents an error for values (a & b) where a cannot be lower than b
func (*HigherLowerError) Error ¶
func (e *HigherLowerError) Error() string
type Order ¶
type Order struct {
// contains filtered or unexported fields
}
Order contains data to calculate order figures
func (*Order) RiskRewardRatio ¶
RiskRewardRatio returns a risk reward ratio value for an order
Click to show internal directories.
Click to hide internal directories.