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