-
Notifications
You must be signed in to change notification settings - Fork 23
/
config.sample.js
175 lines (149 loc) · 4.69 KB
/
config.sample.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
// Everything is explained here:
// @link https://github.com/askmike/gekko/blob/stable/docs/Configuring_gekko.md
var config = {};
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// GENERAL SETTINGS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.debug = false; // for additional logging / debugging
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// WATCHING A MARKET
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Monitor the live market
config.watch = {
// see https://github.com/askmike/gekko#supported-exchanges
exchange: 'btcc',
currency: 'CNY',
asset: 'BTC'
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING TRADING ADVICE
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.tradingAdvisor = {
enabled: true,
method: 'gannswing',
candleSize: 60,
historySize: 25,
adapter: 'sqlite',
talib: {
enabled: true,
version: '1.0.2'
}
}
config['gannswing'] = {
// stop-loss
stoploss: {
// stop-loss enabled
enabled: false,
// if stop-loss enabled, shall it be trailing?
trailing: false,
// how many percent before we trigger stop-loss sell?
percent: 5
},
vixperiod: 20,
// trend reaction time between 50 and 250
swingperiod: 250
}
config['debug-advice'] = {
wait: 1,
advice: 'long'
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING PLUGINS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Want Gekko to perform real trades on buy or sell advice?
// Enabling this will activate trades for the market being
// watched by `config.watch`.
config.trader = {
enabled: false,
key: '',
secret: '',
username: '' // your username, only required for specific exchanges.
}
config.adviceLogger = {
enabled: true,
muteSoft: true // disable advice printout if it's soft
}
// do you want Gekko to calculate the profit of its own advice?
config.profitSimulator = {
enabled: true,
// report the profit in the currency or the asset?
reportInCurrency: true,
// start balance, on what the current balance is compared with
simulationBalance: {
// these are in the unit types configured in the watcher.
asset: 0,
currency: 1000,
},
// how much fee in % does each trade cost?
fee: 0.25,
// how much slippage/spread should Gekko assume per trade?
slippage: 0.05
}
config.pushover = {
enabled: false,
sendPushoverOnStart: false,
muteSoft: true, // disable advice printout if it's soft
tag: '[GEKKO]',
key: '',
user: ''
}
config.candleWriter = {
adapter: 'sqlite',
enabled: true
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING ADAPTER
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.adapters = {
sqlite: {
path: 'plugins/sqlite',
dataDirectory: './history',
version: 0.1,
dependencies: [{
module: 'sqlite3',
version: '3.1.4'
}]
},
// Postgres adapter example config (please note: requires postgres >= 9.5):
postgresql: {
path: 'plugins/postgresql',
version: 0.1,
connectionString: 'postgres://user:pass@localhost:5432', // if default port
dependencies: [{
module: 'pg',
version: '6.1.0'
}]
}
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING BACKTESTING
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Note that these settings are only used in backtesting mode, see here:
// @link: https://github.com/askmike/gekko/blob/stable/docs/Backtesting.md
config.backtest = {
adapter: 'sqlite',
daterange: 'scan',
batchSize: 50
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING IMPORTING
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.importer = {
daterange: {
// NOTE: these dates are in UTC
from: "2015-01-01 01:00:00",
}
}
// set this to true if you understand that Gekko will
// invest according to how you configured the indicators.
// None of the advice in the output is Gekko telling you
// to take a certain position. Instead it is the result
// of running the indicators you configured automatically.
//
// In other words: Gekko automates your trading strategies,
// it doesn't advice on itself, only set to true if you truly
// understand this.
//
// Not sure? Read this first: https://github.com/askmike/gekko/issues/201
config['I understand that Gekko only automates MY OWN trading strategies'] = true;
module.exports = config;