Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InvGrid ¶
func InvGrid(pol *config.RunPolicyConfig) *strat.TradeStrat
Types ¶
type Grid ¶
type Grid struct {
InitRate float64 // Opening the grid for the first time to input multiple 初次打开网格投入倍数
MaxAdd int // Maximum number of warehouse additions 最大加仓次数
SLRate float64 // Multiple of stop loss relative to Unit 止损相对Unit的倍数
Dirt float64 // Are you currently long or short on the grid; 1 long, -1 short 当前是做多网格还是做空;1做多,-1做空
HoldSize float64 // Holding position ratio; Relative unit opening size 持有仓位倍率;相对单位开仓大小
Unit float64 // grid price unit 网格价格单位
OneAmt float64 // The quantity is calculated upon initial entry 一份的数量,初次入场时计算
EntPrice float64 // Entry price 入场价格
Pos float64 // grid position, integer, 网格位置,整数,-6/-5/-4/-3/-2/-1/0/1/2/3/4/5/6
OldPos float64 // Last grid location 上次网格位置
Debug bool
// contains filtered or unexported fields
}
func (*Grid) OnOrderChange ¶
Click to show internal directories.
Click to hide internal directories.