Browse Source

Strategy: refactoring

- Cooldown: let it be configurable
- Handle: respect proba's timestamp
Alexey Kim 2 weeks ago
parent
commit
7b5f303a20
1 changed files with 2 additions and 2 deletions
  1. 2 2
      strategy.go

+ 2 - 2
strategy.go

@@ -12,9 +12,9 @@ type Strategy interface {
 	MarketId() string
 	PositionSymbols() map[Side]string
 	Interval() uint8
-	Cooldown() time.Duration
+	Cooldown(periods uint8) time.Duration
 
-	Handle(market Market, proba float64) ([]StrategyOrder, error)
+	Handle(market Market, ts time.Time, proba float64) ([]StrategyOrder, error)
 }
 
 type StrategyOrder struct {