mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
pivotshort: drop unused tail function
This commit is contained in:
parent
5821dd02cb
commit
2719c86400
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user