2
0
Prechádzať zdrojové kódy

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 mesiac pred
rodič
commit
7f2f24af49
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      strategy/alpaca/qqq06f/strategy.go

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