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 = {}; | |
var parameters = { | |
short: 12, | |
long: 26, | |
signal: 9, | |
down: -0.001, | |
up: 0.001, | |
persistence: 1 | |
}; |
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
// Let's create our own strategy | |
var strat = {}; | |
var parameters = { | |
short: 12, | |
long: 26, | |
signal: 9, | |
down: 0, | |
up: 0, | |
persistence: 1 |
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
// Let's create our own strategy | |
var strat = {}; | |
// Prepare everything our strat needs | |
strat.init = function() { | |
// start of with no investment | |
this.currentTrend = 'short'; | |
// your code! | |
// add a native MACD | |
var parameters = {short: 12, long: 26, signal: 9,down = -0.0001, |