Documentation ¶
Index ¶
- func Abs(i float32) float32
- func AddSecond(t time.Time, second int64) time.Time
- func BuySize(price float32, buyunit float32, value float32) float32
- func Float32(str string) float32
- func FloatDeceimal(f float32) float32
- func FloatString(f float32) string
- func Floor(value float32) float32
- func Int32(str string) int32
- func Int32ToFloat(i int32) float32
- func Int64(str string) int64
- func IsoTime(t time.Time) string
- func IsoToTime(iso string) (time.Time, error)
- func Log()
- func Lower(s string) string
- func Max(values ...float32) float32
- func MaxInt(values ...int) int
- func Min(values ...float32) float32
- func MkDir(dir string) (bool, error)
- func PayFee(price float32, size, value float32) float32
- func PriceEqual(dest float32, price float32) bool
- func PriceTend(prices []float32) int32
- func Profit(op conset.OPERATION, price float32, lastprice float32, size, value float32) float32
- func ProfitRate(profit float32, total float32) float32
- func QQMail(from string, to []string, title string, body string, password string) error
- func SecondsTime(second int64) time.Time
- func SqrtN(m float32, n float32) float32
- func SqrtN64(m float64, n float64) float64
- func StringToTime(str string) time.Time
- func SubHours(t1 time.Time, t2 time.Time) float32
- func TimeFormatDay(t time.Time) string
- func TimeFormatString(t time.Time) string
- func TimeMillis(t time.Time) int64
- func Unit(total float32, price float32) float32
- func UnixMillis(t time.Time) string
- func Upper(s string) string
- func UsdtProfit(op conset.OPERATION, closePrice, openPrice float32, size, value float32) float32
- func ZDollar(symbol conset.SYMBOL) float32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FloatDeceimal ¶
func FloatString ¶
func Int32ToFloat ¶
func SecondsTime ¶
func StringToTime ¶
func TimeFormatDay ¶
func TimeFormatString ¶
func TimeMillis ¶
func Unit ¶
*
- 买入单位,回撤 ATR 亏损比例
- rate*Total = atr/price * Unit
- rate: 总账户最大亏损(总账户 满足连续最大亏损40次)
- atr/price 回撤(高位最大回撤 0.04)
func UnixMillis ¶
func UsdtProfit ¶
USDT收益 正向合约 做多:收益=(平仓价-开仓价)*面值*张数=(平仓价-开仓价)*数量 做空:收益=(开仓价-平仓价)*面值*张数=(开仓价-平仓价)*数量
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.