mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
pivotshort: fix tail function
This commit is contained in:
parent
bfb7dd51d6
commit
0d5d92b26d
|
@ -72,7 +72,7 @@ func (s *ResistanceShort) Bind(session *bbgo.ExchangeSession, orderExecutor *bbg
|
|||
}
|
||||
|
||||
func tail(arr []float64, length int) []float64 {
|
||||
if len(arr) < length {
|
||||
if len(arr) == 0 || len(arr) < length {
|
||||
return arr
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user