2
0
Эх сурвалжийг харах

Alpaca: qqq06f

- decrease order size down to .1 if its after 4pm
Alexey Kim 1 сар өмнө
parent
commit
3f221e16ab

+ 8 - 0
strategy/alpaca/qqq06f/strategy.go

@@ -100,6 +100,10 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 				Symbol: symbol,
 				Action: sentio.OrderBuy,
 				Ratio: func() float64 {
+					if t.Hour() >= 16 {
+						return .1
+					}
+
 					if ok {
 						return .4
 					} else {
@@ -138,6 +142,10 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 				Symbol: symbol,
 				Action: sentio.OrderBuy,
 				Ratio: func() float64 {
+					if t.Hour() >= 16 {
+						return .1
+					}
+
 					if ok {
 						return .4
 					} else {