Browse Source

RiskManager

- add ATR
Alexey Kim 5 months ago
parent
commit
de09a96bd4
2 changed files with 2 additions and 0 deletions
  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")
 	ErrTooSmallOrder = errors.New("too small order size")
 	ErrHighStoploss  = errors.New("base price is lower than stoploss")
 	ErrHighStoploss  = errors.New("base price is lower than stoploss")
 	ErrLowTakeProfit = errors.New("base price is too close to take profit")
 	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
 package sentio
 
 
 type RiskManager interface {
 type RiskManager interface {
+	ATR(symbol string) float64
 	StopLoss(symbol string, current float64) float64
 	StopLoss(symbol string, current float64) float64
 	TakeProfit(symbol string, current float64) float64
 	TakeProfit(symbol string, current float64) float64
 }
 }