Skip to content

Commit

Permalink
Adjusted trend EMA check to match description 'sell when (EMA - last(…
Browse files Browse the repository at this point in the history
…EMA) < 0)'
  • Loading branch information
mathiasaerts committed Dec 13, 2017
1 parent bba3b75 commit 59eed42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/strategies/trend_ema/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = function container (get, set, clear) {
s.signal = !s.acted_on_trend ? 'buy' : null
s.cancel_down = false
}
else if (!s.cancel_down && s.period.trend_ema_rate < (s.period.trend_ema_stddev * -1)) {
else if (!s.cancel_down && s.period.trend_ema_rate < s.period.trend_ema_stddev) {
if (s.trend !== 'down') {
s.acted_on_trend = false
}
Expand Down

0 comments on commit 59eed42

Please sign in to comment.