Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
cdl3inside example
var method = {};
// Prepare everything our method needs
method.init = function() {
this.name = 'cdl3inside'
this.input = 'candle';
this.requiredHistory = this.tradingAdvisor.historySize;
// define the candle indicator
this.addTalibIndicator('cdl', 'cdl3inside', {});
}
method.update = function(candle) {}
method.log = function() {}
method.check = function(candle) {
var price = candle.close;
var result = this.talibIndicators.cdl.result;
console.log('\t\t\t', result);
}
module.exports = method;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment