forked from mlmurray/gekko
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
151 lines (136 loc) · 4.12 KB
/
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
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
// Everything is explained here:
// https://github.com/askmike/gekko/blob/master/docs/Configuring_gekko.md
var config = {};
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// NORMAL ZONE
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Gekko currently only supports Exponential Moving Averages
config.tradingMethod = 'Exponential Moving Averages';
// Exponential Moving Averages settings:
config.EMA = {
// timeframe per candle
interval: 60, // in minutes
// EMA weight (α)
// the higher the weight, the more smooth (and delayed) the line
short: 10,
long: 21,
// amount of candles to remember and base initial EMAs on
candles: 100,
// the difference between the EMAs (to act as triggers)
sellTreshold: -0.25,
buyTreshold: 0.25
};
// Monitor the live market
config.normal = {
enabled: true,
exchange: 'MtGox', // 'MtGox', 'BTCe', 'Bitstamp' or 'cexio'
currency: 'USD',
asset: 'BTC',
tradingEnabled: false,
key: 'your-key',
secret: 'your-secret',
username: 0, // your username, only fill in when using bitstamp or cexio
}
// want Gekko to send a mail on buy or sell advice?
config.mail = {
enabled: false,
sendMailOnStart: true,
what: ['BUY', 'SELL'], // send email by type of advice: any combination of 'BUY', 'SELL', 'HOLD'
email: '', // the receiver of the email, e.g. [email protected]
smtp: 'smtp.gmail.com', // if no smtp server specified, fallback to mail.gmail.com
port: 25, // use a different smtp port
ssl: true,
tls: false, // set to true if want STARTTLS
user: '', // the username, this is the sender of the email, e.g. [email protected]
// You don't have to set your password here, if you leave it blank we will ask it
// when Gekko's starts.
//
// NOTE: Gekko is an open source project < https://github.com/askmike/gekko >,
// make sure you looked at the code or trust the maintainer of this bot when you
// fill in your email and password.
//
// WARNING: If you have NOT downloaded Gekko from the github page above we CANNOT
// garantuee that your email address & password are safe!
password: ''
}
// do you want Gekko to calculate the profit of its own advice?
config.profitCalculator = {
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: 1,
currency: 100,
},
// only want report after a sell? set to `false`.
verbose: false,
// how much fee in % does each trade cost?
fee: 0.6
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ADVANCED ZONE
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Backtesting strategies against historical data
//
// Test a strategy on historical data
//
// Read here: https://github.com/askmike/gekko/blob/master/docs/Backtesting.md
//
// NOTE: THIS FEATURE HAS NOT BEEN PROPERELY TESTED YET, IT IS NOT
// ADVISED TO MAKE REAL WORLD DECISIONS BASED ON THE RESULTS
// UNTIL THE CODE HAS BEEN PROVED SOLID.
config.backtest = {
candleFile: 'candles.csv',
from: 0,
to: 0
}
// For when you want to monitor a market but want to act (trade) on a different one
// (or different ones).
//
// Check: https://github.com/askmike/gekko/blob/master/docs/Configuring_gekko.md
// monitor what market?
config.watch = {
exchange: 'MtGox',
currency: 'USD',
asset: 'BTC'
}
// real trading
config.traders = [
{
exchange: 'MtGox',
key: '',
secret: '',
currency: 'USD',
asset: 'BTC',
enabled: false
},
{
exchange: 'BTCe',
key: '',
secret: '',
currency: 'USD',
asset: 'BTC',
enabled: false
},
{
exchange: 'Bitstamp',
user: '',
password: '',
currency: 'USD',
asset: 'BTC',
enabled: false
},
{
exchange: 'cex.io',
key: '',
secret: '',
currency: 'BTC',
asset: 'GHS',
enabled: false
}
];
config.debug = false; // for additional logging / debugging
module.exports = config;