Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Always log levels returned for all strategies (closes #436) (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsaraf authored Jun 8, 2020
1 parent 25f3862 commit 23e65ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions plugins/pendulumLevelProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ func (p *pendulumLevelProvider) GetLevels(maxAssetBase float64, maxAssetQuote fl

baseExposed += expectedBaseUsage
}

log.Printf("levels created (sideIsBuy=%v): %v\n", p.useMaxQuoteInTargetAmountCalc, levels)
printPrice2LastPriceMap()

return levels, nil
Expand Down
7 changes: 5 additions & 2 deletions plugins/sellSideStrategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,15 @@ func (s *sellSideStrategy) PreUpdate(maxAssetBase float64, maxAssetQuote float64
}

// load desiredLevels only once here
var e error
s.desiredLevels, e = s.levelsProvider.GetLevels(s.maxAssetBase, s.maxAssetQuote)
newLevels, e := s.levelsProvider.GetLevels(s.maxAssetBase, s.maxAssetQuote)
if e != nil {
log.Printf("levels couldn't be loaded: %s\n", e)
return e
}
log.Printf("levels returned (side = %s): %v\n", s.action, newLevels)

// set desiredLevels only once here
s.desiredLevels = newLevels
return nil
}

Expand Down

0 comments on commit 23e65ab

Please sign in to comment.