浏览代码

Alpaca: qqq06f

- decrease order size down to .1 if its after 4pm
Alexey Kim 1 月之前
父节点
当前提交
3f221e16ab
共有 1 个文件被更改,包括 8 次插入0 次删除
  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 {