Skip to content

Instantly share code, notes, and snippets.

View askmike's full-sized avatar

Mike van Rossum askmike

View GitHub Profile
@askmike
askmike / debug-advice.js
Last active September 3, 2017 09:05
debug strats
var settings = {
wait: 0,
advice: 'short'
};
// -------
var _ = require('lodash');
var log = require('../core/log.js');
@askmike
askmike / mutliple-ema.js
Last active June 13, 2018 23:29
multiple-ema.js
// helpers
var _ = require('lodash');
var log = require('../core/log.js');
// let's create our own method
var method = {};
// prepare everything our method needs
method.init = function() {
this.name = 'multiple-emas';
@askmike
askmike / custom-dema.js
Created September 1, 2017 10:18
custom-dema.js
// helpers
var _ = require('lodash');
var log = require('../core/log.js');
// let's create our own method
var method = {};
// prepare everything our method needs
method.init = function() {
this.name = 'custom-DEMA';
@askmike
askmike / pipe.js
Last active July 30, 2017 14:38
pipe.js
const pathToGekko = './';
// your config:
const config = {
watch: {
exchange: 'bitstamp',
currency: 'USD',
asset: 'BTC'
},
tradingAdvisor: { enabled: false } // temp..
@askmike
askmike / import.js
Last active July 25, 2017 15:28
import.js
// Everything is explained here:
// @link https://github.com/askmike/gekko/blob/stable/docs/advanced_usage/plugins.md
var config = {};
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// GENERAL SETTINGS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.debug = true; // for additional logging / debugging
@askmike
askmike / buysellat.js
Created July 23, 2017 21:58
buysellat
// helpers
// var _ = require('lodash');
var log = require('../core/log.js');
//var config = require('../core/util.js').getConfig();
//var settings = config.buyatsellat;
// let's create our own method
var method = {};
@askmike
askmike / strat.js
Last active August 9, 2021 14:02 — forked from Pedro942/strat.js
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
@askmike
askmike / strat.js
Created May 4, 2017 11:48 — forked from Pedro942/strat.js
Start.JS
// Let's create our own strategy
var strat = {};
var parameters = {
short: 12,
long: 26,
signal: 9,
down: -0.0001,
up: 0.005,
persistence: 1
@askmike
askmike / test.js
Last active April 10, 2017 12:04
1m candle test
var strat = {};
strat.init = function() {}
strat.update = function(candle) {}
strat.log = function() {}
strat.check = function(candle) {
console.log(candle.start.format());
}
@askmike
askmike / strat.js
Last active November 15, 2020 20:15
var _ = require('lodash');
// examples values:
var RSIinterval = 10;
var RSIlow = 20;
var RSIhigh = 80;
var StochRSIinterval = 15;
var StochRSIlow = 30;
var StochRSIhigh = 70;