|
@@ -33,10 +33,6 @@ func (s alpacaQQQ) Interval() uint8 {
|
|
|
}
|
|
|
|
|
|
func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.StrategyOrder, error) {
|
|
|
- if !market.IsMarketOpened() {
|
|
|
- return nil, sentio.ErrMarketClosed
|
|
|
- }
|
|
|
-
|
|
|
var (
|
|
|
portfolio sentio.Portfolio
|
|
|
orders []sentio.StrategyOrder
|
|
@@ -60,7 +56,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
|
|
|
}
|
|
|
|
|
|
// skip too early trades
|
|
|
- if t.Hour() == 14 && t.Minute() < 40 {
|
|
|
+ if t.Hour() == 9 && t.Minute() < 40 {
|
|
|
continue
|
|
|
}
|
|
|
|
|
@@ -72,7 +68,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
|
|
|
}
|
|
|
|
|
|
// Close positions before market closed
|
|
|
- if ok && t.Hour() == 20 && t.Minute() > 45 {
|
|
|
+ if ok && t.Hour() == 15 && t.Minute() > 45 {
|
|
|
orders = append(orders, sentio.StrategyOrder{
|
|
|
Symbol: symbol,
|
|
|
Action: sentio.OrderSell,
|
|
@@ -104,7 +100,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
|
|
|
}}, nil
|
|
|
}
|
|
|
|
|
|
- if t.Hour() == 20 && t.Minute() > 35 {
|
|
|
+ if t.Hour() == 15 && t.Minute() > 35 {
|
|
|
continue
|
|
|
}
|
|
|
|