trademodel/pos.go
2024-06-25 21:52:58 +08:00

15 lines
316 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package trademodel
const (
Long = 1
Short = 2
)
type Position struct {
Symbol string
Type int // 合约类型Long: 多头Short: 空头
Hold float64 // 持有仓位
Price float64 //开仓价格
ProfitRatio float64 // 盈利比例,正数表示盈利,负数表示亏岁
}