Versions in this module Expand all Collapse all v0 v0.1.2 Sep 19, 2026 v0.1.1 Sep 19, 2026 Changes in this version + const ContractSpecificationsTable + const DrawdownRecoveryTable + const LosingStreakEquityTable + const PipValueByLotSizeTable + var Data embed.FS + var ErrNoSuchTable = errors.New("positionsizing: unknown table") + func FloorToStep(v, step float64) float64 + func PipValue(units, pipSize, quoteToAccountRate float64) float64 + func PositionSize(balance, riskPercent, entry, stop, unitStep float64) (float64, error) + func RecoveryGain(drawdown float64) (float64, error) + func RemainingEquity(riskPercent float64, losses int) float64 + func Table(name string) ([][]string, error) + type Contract struct + AssetClass string + ContractSize float64 + PipSize float64 + QuoteCurrency string + Symbol string + UnitStep float64 + func ContractFor(symbol string) (Contract, bool) + func Contracts() ([]Contract, error)