Explorar o código

RiskManager

- add ATR
Alexey Kim hai 5 meses
pai
achega
de09a96bd4
Modificáronse 2 ficheiros con 2 adicións e 0 borrados
  1. 1 0
      errors.go
  2. 1 0
      risk_manager.go

+ 1 - 0
errors.go

@@ -7,4 +7,5 @@ var (
 	ErrTooSmallOrder = errors.New("too small order size")
 	ErrHighStoploss  = errors.New("base price is lower than stoploss")
 	ErrLowTakeProfit = errors.New("base price is too close to take profit")
+	ErrLowVolatility = errors.New("too low volatility")
 )

+ 1 - 0
risk_manager.go

@@ -1,6 +1,7 @@
 package sentio
 
 type RiskManager interface {
+	ATR(symbol string) float64
 	StopLoss(symbol string, current float64) float64
 	TakeProfit(symbol string, current float64) float64
 }