func (slice PriceVolumeSlice) Trim() (pvs PriceVolumeSlice) {
	for _, pv := range slice {
		if pv.Volume > 0 {
			pvs = append(pvs, pv)
		}
	}
	return pvs
}
Trim removes the pairs that volume = 0
package types
import (
	"sort"
	"github.com/c9s/bbgo/pkg/fixedpoint"
)
type PriceVolumeSlice []PriceVolume
func (slice PriceVolumeSlice) Len() int           { return len(slice) }
func (slice PriceVolumeSlice) Less(i, j int) bool { return slice[i].Price < slice[j].Price }
func (slice PriceVolumeSlice) Swap(i, j int)      { slice[i], slice[j] = slice[j], slice[i] }