2
0
Pārlūkot izejas kodu

Alpaca: qqq06f

- decrease order size down to .1 if its after 4pm
Alexey Kim 1 mēnesi atpakaļ
vecāks
revīzija
3f221e16ab
1 mainītis faili ar 8 papildinājumiem un 0 dzēšanām
  1. 8 0
      strategy/alpaca/qqq06f/strategy.go

+ 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 {