Last active
April 13, 2019 10:15
-
-
Save askmike/655f63de5e42eb2d8951fb269473dfd8 to your computer and use it in GitHub Desktop.
cdl3inside example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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