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

Alpaca: qqq06f

- LONG: prevent LONG positions if current price is under DEMA(8)
- decrease order size down to .3 if its after 4pm
Alexey Kim 1 сар өмнө
parent
commit
7f2f24af49

+ 2 - 2
strategy/alpaca/qqq06f/strategy.go

@@ -101,7 +101,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 				continue
 			}
 
-			if dema = market.SMA(s.PositionSymbols()[sentio.LONG], 15, 8, 1); dema == nil || len(dema) < 1 {
+			if dema = market.DEMA(s.PositionSymbols()[sentio.LONG], 15, 8, 1); dema == nil || len(dema) < 1 {
 				continue
 			}
 
@@ -109,7 +109,7 @@ func (s alpacaQQQ) Handle(market sentio.Market, proba float64) ([]sentio.Strateg
 				continue
 			}
 
-			// prevent SHORTing if current price is under DEMA(8)
+			// prevent LONG positions if current price is under DEMA(8)
 			if lb.Close/dema[0] < .999 {
 				continue
 			}