Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Commit

Permalink
RSI, oversold start optimization (#1691)
Browse files Browse the repository at this point in the history
* Update strategy.js

Correct code proposed in the second pull request.
This code is tested and works, actually I'm using whit this modifications and all works ok.
Sorry again for my error.

* Optimized RSI

Adding validation before execute all the conditionals

* Optimization RSI

Adding validation before execute all the conditionals

* Optimization RSI strategy

* Optimization RSI strategy
  • Loading branch information
diegstroyer authored and DeviaVir committed Aug 25, 2018
1 parent ceef864 commit af8c742
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/strategies/rsi/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
onPeriod: function (s, cb) {
if (s.in_preroll) return cb()
if (typeof s.period.rsi === 'number') {
if (s.trend !== 'oversold' && s.trend !== 'long' && s.period.rsi <= s.options.oversold_rsi) {
if (s.trend === undefined && s.period.rsi <= s.options.oversold_rsi) {
s.rsi_low = s.period.rsi
s.trend = 'oversold'
}
Expand Down

0 comments on commit af8c742

Please sign in to comment.