Skip to content

Commit

Permalink
Return newly created indicator instance in addIndicator method (askmi…
Browse files Browse the repository at this point in the history
…ke#1871)

* return the indicator after adding it
  • Loading branch information
ansonphong authored and askmike committed Feb 19, 2018
1 parent 4f69a71 commit 7dfdc99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/tradingAdvisor/baseTradingMethod.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Base.prototype.addIndicator = function(name, type, parameters) {
if(this.setup)
util.die('Can only add indicators in the init method!');

this.indicators[name] = new Indicators[type](parameters);
return this.indicators[name] = new Indicators[type](parameters);

// some indicators need a price stream, others need full candles
}
Expand Down

0 comments on commit 7dfdc99

Please sign in to comment.