Skip to content

Instantly share code, notes, and snippets.

@askmike
Last active April 13, 2019 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save askmike/655f63de5e42eb2d8951fb269473dfd8 to your computer and use it in GitHub Desktop.
Save askmike/655f63de5e42eb2d8951fb269473dfd8 to your computer and use it in GitHub Desktop.
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