Parcourir la source

RiskManager

- add ATR
Alexey Kim il y a 5 mois
Parent
commit
de09a96bd4
2 fichiers modifiés avec 2 ajouts et 0 suppressions
  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
 }