pivotshort: drop unused tail function

This commit is contained in:
c9s 2022-07-27 13:54:19 +08:00
parent 5821dd02cb
commit 2719c86400
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -64,15 +64,7 @@ func (s *ResistanceShort) Bind(session *bbgo.ExchangeSession, orderExecutor *bbg
}))
}
func tail(arr []float64, length int) []float64 {
if len(arr) == 0 || len(arr) < length {
return arr
}
return arr[len(arr)-1-length:]
}
// updateCurrentResistancePrice update the current resistance price
// updateCurrentResistancePrice updates the current resistance price
// we should only update the resistance price when:
// 1) the close price is already above the current resistance price by (1 + minDistance)
// 2) the next resistance price is lower than the current resistance price.