mirror of
https://github.com/lukewilson2002/autotrader.git
synced 2025-08-02 21:19:33 +00:00
Fixed so many IndexedSeries bugs...
This commit is contained in:
2
utils.go
2
utils.go
@@ -18,7 +18,7 @@ func Crossover(a, b *Series) bool {
|
||||
return a.Float(-1) > b.Float(-1) && a.Float(-2) <= b.Float(-2)
|
||||
}
|
||||
|
||||
func CrossoverIndex[I comparable](index I, a, b *IndexedSeries[I]) bool {
|
||||
func CrossoverIndex[I Index](index I, a, b *IndexedSeries[I]) bool {
|
||||
aRow, bRow := a.Row(index), b.Row(index)
|
||||
if aRow < 1 || bRow < 1 {
|
||||
return false
|
||||
|
Reference in New Issue
Block a user