|
@@ -7,9 +7,9 @@ import (
|
|
)
|
|
)
|
|
|
|
|
|
const (
|
|
const (
|
|
- ATR_MULTIPLIER = 1.5
|
|
|
|
- ATR_PERIOD = 14
|
|
|
|
- ATR_HHV = 4
|
|
|
|
|
|
+ ATR_MULTIPLIER = 3
|
|
|
|
+ ATR_PERIOD = 21
|
|
|
|
+ ATR_HHV = 10
|
|
)
|
|
)
|
|
|
|
|
|
var Strategy = qqq{}
|
|
var Strategy = qqq{}
|
|
@@ -85,7 +85,7 @@ func (strategy qqq) Handle(market sentio.Market, probability sentio.Probability)
|
|
for i := range orders {
|
|
for i := range orders {
|
|
if strategy.PositionSymbols()[sentio.LONG] == orders[i].GetSymbol() &&
|
|
if strategy.PositionSymbols()[sentio.LONG] == orders[i].GetSymbol() &&
|
|
probability.Value < 1.0008 {
|
|
probability.Value < 1.0008 {
|
|
- if _, err = market.CloseOrder(orders[i].GetId()); err != nil {
|
|
|
|
|
|
+ if _, err = market.CloseOrder(orders[i]); err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
|
|
@@ -95,7 +95,7 @@ func (strategy qqq) Handle(market sentio.Market, probability sentio.Probability)
|
|
|
|
|
|
if strategy.PositionSymbols()[sentio.SHORT] == orders[i].GetSymbol() &&
|
|
if strategy.PositionSymbols()[sentio.SHORT] == orders[i].GetSymbol() &&
|
|
probability.Value > .9998 {
|
|
probability.Value > .9998 {
|
|
- if _, err = market.CloseOrder(orders[i].GetId()); err != nil {
|
|
|
|
|
|
+ if _, err = market.CloseOrder(orders[i]); err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
|