Browse Source

Alpaca

- QQQ 04f
Alexey Kim 5 months ago
parent
commit
b685e769a5
1 changed files with 7 additions and 7 deletions
  1. 7 7
      strategy/alpaca/qqq04f/strategy.go

+ 7 - 7
strategy/alpaca/qqq15/strategy.go → strategy/alpaca/qqq04f/strategy.go

@@ -13,7 +13,7 @@ func (s alpacaQQQ) Name() string {
 }
 
 func (s alpacaQQQ) Model() string {
-	return "qqq003"
+	return "qqq04f"
 }
 
 func (s alpacaQQQ) MarketId() string {
@@ -57,7 +57,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() == 19 && t.Minute() > 30 {
 			orders = append(orders, sentio.StrategyOrder{
 				Symbol: symbol,
 				Action: sentio.OrderSell,
@@ -71,7 +71,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 		}
 
 		// Close LONG position
-		if ok && sentio.LONG == side && proba < 1.0006 {
+		if ok && sentio.LONG == side && proba < 1.00009 {
 			orders = append(orders, sentio.StrategyOrder{
 				Symbol: symbol,
 				Action: sentio.OrderSell,
@@ -87,11 +87,11 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 			})
 		}
 
-		if t.Hour() == 19 && t.Minute() >= 45 {
+		if t.Hour() == 19 && t.Minute() > 29 {
 			continue
 		}
 
-		if sentio.LONG == side && proba > 1.0015 {
+		if sentio.LONG == side && proba > 1.00109 {
 			if ok && position != nil && position.GetCurrentPrice() > position.GetAvgPrice() {
 				continue
 			}
@@ -110,7 +110,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 			continue
 		}
 
-		if sentio.SHORT == side && proba < .9987 {
+		if sentio.SHORT == side && proba < .9999 {
 			if ok && position != nil && position.GetCurrentPrice() > position.GetAvgPrice() {
 				continue
 			}
@@ -122,7 +122,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 					if ok {
 						return .3
 					} else {
-						return .8
+						return .6
 					}
 				}(),
 			})