forked from nick-dolan/gekko-batcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample-config.js
115 lines (92 loc) · 2.81 KB
/
sample-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
const config = {}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// GENERAL SETTINGS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Name of batch (will show up in generated csv's file name )
config.name = 'My'
// Save results to csv
config.saveToCsv = true
config.gekkoPath = '../gekko/'
config.gekkoConfigFileName = 'config.js'
// URL that serving Gekko UI
config.apiUrl = 'http://localhost:3000'
// Keep it lower than the number of cores you have
// Note: 2 is recommended value for import mode
config.parallelQueries = 2
config.candleSizes = [30, 60]
config.historySizes = [10, 15]
// Format: [exchange, currency, asset]
config.tradingPairs = [
['binance', 'usdt', 'btc'],
['poloniex', 'eth', 'zec']
]
// Note: only one daterange for "import" mode allowed if parallelQueries > 1
// It's related to constraints with database
config.dateranges = [{
from: '2018-06-05 00:00',
to: '2018-07-05 00:00'
}, {
from: '2018-06-05 00:00',
to: '2018-07-30 00:00'
}]
// Shuffle generated combinations of method's configs
config.shuffle = true
// Initial balance, fees and slippage/spread
config.paperTrader = {
simulationBalance: {
currency: 1000,
asset: 1
},
feeMaker: 0.25,
feeTaker: 0.25,
feeUsing: 'maker',
slippage: 0.05
}
// Where to get method's settings.
// The first has high priority. Then second, if there's no settings in first place and so on.
// batcher – strategy settings below here
// gekko – gekko's config.js
// toml.js – gekko's toml files
config.configPriorityLocations = ['batcher', 'gekko', 'gekko-toml']
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// BACKTEST BATCHER
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.methods = ['RSI', 'MACD', 'StochRSI', 'CCI']
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// BRUTEFORCE SEARCHER
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specify strategy you want for bruteforce
config.method = 'RSI'
// Specify ranges settings for the given method. It generates all
// possible combinations of a set of settings with given ranges
// Format for range: 'start:step:end' or 'true|false'
config.ranges = {
interval: '8:1:10',
thresholds: {
low: '24:1:26',
high: '70:1:80',
persistence: 1
}
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// STRATEGY SETTINGS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.RSI = {
interval: 15,
thresholds: {
low: 25,
high: 75,
persistence: 1
}
}
config.MACD = {
short: 10,
long: 21,
signal: 9,
thresholds: {
down: -0.000025,
up: 0.000025,
persistence: 1
}
}
module.exports = config