Alexey Kim 1 week ago
parent
commit
7a9e73de1e
2 changed files with 5 additions and 0 deletions
  1. 3 0
      strategy/alpaca/qqq15/strategy.go
  2. 2 0
      strategy/alpaca/qqq15_nodelay/strategy.go

+ 3 - 0
strategy/alpaca/qqq15/strategy.go

@@ -84,7 +84,10 @@ func (s alpacaQQQ) Handle(market sentio.Market, ts time.Time, proba float64) ([]
 			return nil, err
 			return nil, err
 		}
 		}
 
 
+		fmt.Printf("Quotes: %s [BID: %f] [ASK: %s]\n", symbol, quote.BidPrice, quote.AskPrice)
+
 		if bars, err = market.HistoricalBars(symbol, time.Minute, nil); err == nil && len(bars) > 0 {
 		if bars, err = market.HistoricalBars(symbol, time.Minute, nil); err == nil && len(bars) > 0 {
+			fmt.Printf("HistoricalBars: %s", bars[len(bars)-1].Datetime.Format(time.RFC3339))
 			h := make([]float64, len(bars))
 			h := make([]float64, len(bars))
 			l := make([]float64, len(bars))
 			l := make([]float64, len(bars))
 			c := make([]float64, len(bars))
 			c := make([]float64, len(bars))

+ 2 - 0
strategy/alpaca/qqq15_nodelay/strategy.go

@@ -84,6 +84,8 @@ func (s alpacaQQQ) Handle(market sentio.Market, ts time.Time, proba float64) ([]
 			return nil, err
 			return nil, err
 		}
 		}
 
 
+		fmt.Printf("Quotes: %s [BID: %f] [ASK: %s]\n", symbol, quote.BidPrice, quote.AskPrice)
+
 		if bars, err = market.HistoricalBars(symbol, time.Minute, nil); err == nil && len(bars) > 0 {
 		if bars, err = market.HistoricalBars(symbol, time.Minute, nil); err == nil && len(bars) > 0 {
 			h := make([]float64, len(bars))
 			h := make([]float64, len(bars))
 			l := make([]float64, len(bars))
 			l := make([]float64, len(bars))