Răsfoiți Sursa

RiskManager

- add ATR
Alexey Kim 5 luni în urmă
părinte
comite
de09a96bd4
2 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  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
 }