Browse Source

Strategy

- each strategy must have its market
Alexey Kim 6 months ago
parent
commit
edceca8f39
2 changed files with 5 additions and 0 deletions
  1. 1 0
      strategy.go
  2. 4 0
      strategy/ibkr.go

+ 1 - 0
strategy.go

@@ -5,6 +5,7 @@ type Strategy interface {
 	Version() string
 
 	Model() string
+	MarketId() string
 	PositionSymbols() map[Side]string
 
 	ShouldClosePositions(portfolio Portfolio, proba float64) []string

+ 4 - 0
strategy/ibkr.go

@@ -25,6 +25,10 @@ func (s _ibkr) Model() string {
 	return "btc306"
 }
 
+func (s _ibkr) MarketId() string {
+	return "ibkr"
+}
+
 func (s _ibkr) PositionSymbols() map[sentio.Side]string {
 	return map[sentio.Side]string{
 		sentio.LONG:  "521525019", // BITO