Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2016
812
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.73 KB | None | 0 0
  1. // Everything is explained here:
  2. // @link https://github.com/askmike/gekko/blob/stable/docs/Configuring_gekko.md
  3.  
  4. var config = {};
  5.  
  6. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. // GENERAL SETTINGS
  8. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  9.  
  10. config.debug = true; // for additional logging / debugging
  11.  
  12. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  13. // WATCHING A MARKET
  14. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15.  
  16. // Monitor the live market
  17. config.watch = {
  18.  
  19. // see https://github.com/askmike/gekko#supported-exchanges
  20. exchange: 'Poloniex',
  21. currency: 'BTC',
  22. asset: 'ETH'
  23. }
  24.  
  25. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. // CONFIGURING TRADING ADVICE
  27. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  28.  
  29. config.tradingAdvisor = {
  30. enabled: true,
  31. method: 'DEMA',
  32. candleSize: 60,
  33. historySize: 100,
  34. adapter: 'sqlite',
  35. talib: {
  36. enabled: true,
  37. version: '1.0.2'
  38. }
  39. }
  40.  
  41. // Exponential Moving Averages settings:
  42. config.DEMA = {
  43. // EMA weight (α)
  44. // the higher the weight, the more smooth (and delayed) the line
  45. short: 10,
  46. long: 21,
  47. // amount of candles to remember and base initial EMAs on
  48. // the difference between the EMAs (to act as triggers)
  49. thresholds: {
  50. down: -0.025,
  51. up: 0.025
  52. }
  53. };
  54.  
  55. // MACD settings:
  56. config.MACD = {
  57. // EMA weight (α)
  58. // the higher the weight, the more smooth (and delayed) the line
  59. short: 10,
  60. long: 21,
  61. signal: 9,
  62. // the difference between the EMAs (to act as triggers)
  63. thresholds: {
  64. down: -0.025,
  65. up: 0.025,
  66. // How many candle intervals should a trend persist
  67. // before we consider it real?
  68. persistence: 1
  69. }
  70. };
  71.  
  72. // PPO settings:
  73. config.PPO = {
  74. // EMA weight (α)
  75. // the higher the weight, the more smooth (and delayed) the line
  76. short: 12,
  77. long: 26,
  78. signal: 9,
  79. // the difference between the EMAs (to act as triggers)
  80. thresholds: {
  81. down: -0.025,
  82. up: 0.025,
  83. // How many candle intervals should a trend persist
  84. // before we consider it real?
  85. persistence: 2
  86. }
  87. };
  88.  
  89. // RSI settings:
  90. config.RSI = {
  91. interval: 7,
  92. thresholds: {
  93. low: 30,
  94. high: 70,
  95. // How many candle intervals should a trend persist
  96. // before we consider it real?
  97. persistence: 1
  98. }
  99. };
  100.  
  101. // CCI Settings
  102. config.CCI = {
  103. constant: 0.015, // constant multiplier. 0.015 gets to around 70% fit
  104. history: 90, // history size, make same or smaller than history
  105. thresholds: {
  106. up: 100, // fixed values for overbuy upward trajectory
  107. down: -100, // fixed value for downward trajectory
  108. persistence: 0 // filter spikes by adding extra filters candles
  109. }
  110. };
  111.  
  112. // StochRSI settings
  113. config.StochRSI = {
  114. interval: 3,
  115. thresholds: {
  116. low: 20,
  117. high: 80,
  118. // How many candle intervals should a trend persist
  119. // before we consider it real?
  120. persistence: 3
  121. }
  122. };
  123.  
  124.  
  125. // custom settings:
  126. config.custom = {
  127. my_custom_setting: 10,
  128. }
  129.  
  130. config['talib-macd'] = {
  131. // FastPeriod, SlowPeriod, SignalPeriod
  132. parameters: [10, 21, 9],
  133. thresholds: {
  134. down: -0.025,
  135. up: 0.025,
  136. // How many candle intervals should a trend persist
  137. // before we consider it real?
  138. persistence: 1
  139. }
  140. }
  141.  
  142. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  143. // CONFIGURING PLUGINS
  144. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  145.  
  146. // Want Gekko to perform real trades on buy or sell advice?
  147. // Enabling this will activate trades for the market being
  148. // watched by `config.watch`.
  149. config.trader = {
  150. enabled: true,
  151. key: 'hide',
  152. secret: 'hide',
  153. username: '' // your username, only required for specific exchanges.
  154. }
  155.  
  156. config.adviceLogger = {
  157. enabled: true
  158. }
  159.  
  160. // do you want Gekko to calculate the profit of its own advice?
  161. config.profitSimulator = {
  162. enabled: true,
  163. // report the profit in the currency or the asset?
  164. reportInCurrency: true,
  165. // start balance, on what the current balance is compared with
  166. simulationBalance: {
  167. // these are in the unit types configured in the watcher.
  168. asset: 1,
  169. currency: 100,
  170. },
  171. // how much fee in % does each trade cost?
  172. fee: 0.25,
  173. // how much slippage/spread should Gekko assume per trade?
  174. slippage: 0.1
  175. }
  176.  
  177. // want Gekko to send a mail on buy or sell advice?
  178. config.mailer = {
  179. enabled: false, // Send Emails if true, false to turn off
  180. sendMailOnStart: true, // Send 'Gekko starting' message if true, not if false
  181.  
  182. email: 'hide', // Your Gmail address
  183.  
  184. // You don't have to set your password here, if you leave it blank we will ask it
  185. // when Gekko's starts.
  186. //
  187. // NOTE: Gekko is an open source project < https://github.com/askmike/gekko >,
  188. // make sure you looked at the code or trust the maintainer of this bot when you
  189. // fill in your email and password.
  190. //
  191. // WARNING: If you have NOT downloaded Gekko from the github page above we CANNOT
  192. // guarantuee that your email address & password are safe!
  193.  
  194. password: 'hide', // Your Gmail Password - if not supplied Gekko will prompt on startup.
  195.  
  196. tag: '[GEKKO] ', // Prefix all email subject lines with this
  197.  
  198. // ADVANCED MAIL SETTINGS
  199. // you can leave those as is if you
  200. // just want to use Gmail
  201.  
  202. server: 'smtp.gmail.com', // The name of YOUR outbound (SMTP) mail server.
  203. smtpauth: true, // Does SMTP server require authentication (true for Gmail)
  204. // The following 3 values default to the Email (above) if left blank
  205. user: 'hide', // Your Email server user name - usually your full Email address 'me@mydomain.com'
  206. from: 'hide', // 'me@mydomain.com'
  207. to: 'hide', // 'me@somedomain.com, me@someotherdomain.com'
  208. ssl: false, // Use SSL (true for Gmail)
  209. port: '587', // Set if you don't want to use the default port
  210. tls: true // Use TLS if true
  211. }
  212.  
  213. config.ircbot = {
  214. enabled: false,
  215. emitUpdats: false,
  216. channel: '#your-channel',
  217. server: 'irc.freenode.net',
  218. botName: 'gekkobot'
  219. }
  220.  
  221. config.xmppbot = {
  222. enabled: false,
  223. emitUpdats: false,
  224. client_id: 'jabber_id',
  225. client_pwd: 'jabber_pw',
  226. client_host: 'jabber_server',
  227. client_port: 5222,
  228. status_msg: 'I\'m online',
  229. receiver: 'jabber_id_for_updates'
  230. }
  231.  
  232. config.campfire = {
  233. enabled: false,
  234. emitUpdates: false,
  235. nickname: 'Gordon',
  236. roomId: null,
  237. apiKey: '',
  238. account: ''
  239. }
  240.  
  241. config.redisBeacon = {
  242. enabled: true,
  243. port: 6379, // redis default
  244. host: '127.0.0.1', // localhost
  245. // On default Gekko broadcasts
  246. // events in the channel with
  247. // the name of the event, set
  248. // an optional prefix to the
  249. // channel name.
  250. channelPrefix: 'Poloniex_',
  251. broadcast: [
  252. 'candle'
  253. ]
  254. }
  255.  
  256. config.candleWriter = {
  257. adapter: 'sqlite',
  258. enabled: true
  259. }
  260.  
  261. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  262. // CONFIGURING ADAPTER
  263. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  264.  
  265. config.adapters = {
  266. sqlite: {
  267. path: 'plugins/sqlite',
  268.  
  269. dataDirectory: './history',
  270. version: 0.1,
  271.  
  272. dependencies: [{
  273. module: 'sqlite3',
  274. version: '3.1.4'
  275. }]
  276. }
  277. }
  278.  
  279. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  280. // CONFIGURING BACKTESTING
  281. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  282.  
  283. // Note that these settings are only used in backtesting mode, see here:
  284. // @link: https://github.com/askmike/gekko/blob/stable/docs/Backtesting.md
  285.  
  286. config.backtest = {
  287. adapter: 'sqlite',
  288. daterange: 'scan',
  289. batchSize: 50
  290. }
  291.  
  292. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  293. // CONFIGURING IMPORTING
  294. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  295.  
  296. config.importer = {
  297. daterange: {
  298. // NOTE: these dates are in UTC
  299. from: "2015-09-09 12:00:00"
  300. }
  301. }
  302.  
  303. // set this to true if you understand that Gekko will
  304. // invest according to how you configured the indicators.
  305. // None of the advice in the output is Gekko telling you
  306. // to take a certain position. Instead it is the result
  307. // of running the indicators you configured automatically.
  308. //
  309. // In other words: Gekko automates your trading strategies,
  310. // it doesn't advice on itself, only set to true if you truly
  311. // understand this.
  312. //
  313. // Not sure? Read this first: https://github.com/askmike/gekko/issues/201
  314. config['I understand that Gekko only automates MY OWN trading strategies'] = true;
  315.  
  316. module.exports = config;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement