Procházet zdrojové kódy

draft: NY time shift

Alexey Kim před 3 týdny
rodič
revize
e55aab91eb

+ 3 - 3
strategy/alpaca/qqq13/strategy.go

@@ -60,7 +60,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 		}
 
 		// skip too early trades
-		if t.Hour() < 14 {
+		if t.Hour() < 15 {
 			continue
 		}
 
@@ -72,7 +72,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 		}
 
 		// Close positions before market closed
-		if ok && t.Hour() == 19 && t.Minute() > 45 {
+		if ok && t.Hour() == 20 && t.Minute() > 45 {
 			orders = append(orders, sentio.StrategyOrder{
 				Symbol: symbol,
 				Action: sentio.OrderSell,
@@ -104,7 +104,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 			})
 		}
 
-		if t.Hour() == 19 && t.Minute() > 35 {
+		if t.Hour() == 20 && t.Minute() > 35 {
 			continue
 		}
 

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

@@ -60,7 +60,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 		}
 
 		// skip too early trades
-		if t.Hour() == 13 && t.Minute() < 40 {
+		if t.Hour() == 14 && t.Minute() < 40 {
 			continue
 		}
 
@@ -72,7 +72,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 		}
 
 		// Close positions before market closed
-		if ok && t.Hour() == 19 && t.Minute() > 45 {
+		if ok && t.Hour() == 20 && t.Minute() > 45 {
 			orders = append(orders, sentio.StrategyOrder{
 				Symbol: symbol,
 				Action: sentio.OrderSell,
@@ -104,7 +104,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 			}}, nil
 		}
 
-		if t.Hour() == 19 && t.Minute() > 35 {
+		if t.Hour() == 20 && t.Minute() > 35 {
 			continue
 		}