Skip to content

Commit

Permalink
reverse ema strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
krilson committed Jun 11, 2017
1 parent da8804a commit 66fc7fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/strategies/trend_ema/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ module.exports = function container (get, set, clear) {
s.acted_on_trend = false
}
s.trend = 'up'
s.signal = !s.acted_on_trend ? 'buy' : null
s.signal = !s.acted_on_trend ? 'sell' : null
s.cancel_down = false
}
else if (!s.cancel_down && s.period.trend_ema_rate < (s.period.trend_ema_stddev * -1)) {
if (s.trend !== 'down') {
s.acted_on_trend = false
}
s.trend = 'down'
s.signal = !s.acted_on_trend ? 'sell' : null
s.signal = !s.acted_on_trend ? 'buy' : null
}
}
cb()
Expand Down Expand Up @@ -93,4 +93,4 @@ module.exports = function container (get, set, clear) {
return cols
}
}
}
}

1 comment on commit 66fc7fa

@pursehouse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems too old to not be merged into the main yet. I needed this fix today 12/26/2017. thanks for fixing it! is it still valid as the only fix?

Please sign in to comment.