Skip to content

Instantly share code, notes, and snippets.

var method = {};
var parameters = {
short: 12,
long: 26,
signal: 9,
down: -0.001,
up: 0.001,
persistence: 1
};
@Pedro942
Pedro942 / strat.js
Created May 4, 2017 12:21
Strategy MACD + RSI
// Let's create our own strategy
var strat = {};
var parameters = {
short: 12,
long: 26,
signal: 9,
down: 0,
up: 0,
persistence: 1
@Pedro942
Pedro942 / strat.js
Created May 4, 2017 11:41
Start.JS
// 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,