Advertisement
Guest User

Untitled

a guest
Jan 15th, 2018
898
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.33 KB | None | 0 0
  1. // Everything is explained here:
  2. // @link https://gekko.wizb.it/docs/commandline/plugins.html
  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. config.watch = {
  17.  
  18. // see https://gekko.wizb.it/docs/introduction/supported_exchanges.html
  19. exchange: 'binance',
  20. currency: 'BTC',
  21. asset: 'BNB',
  22.  
  23. // You can set your own tickrate (refresh rate).
  24. // If you don't set it, the defaults are 2 sec for
  25. // okcoin and 20 sec for all other exchanges.
  26. // tickrate: 20
  27. }
  28.  
  29. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  30. // CONFIGURING TRADING ADVICE
  31. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  32.  
  33. config.tradingAdvisor = {
  34. enabled: true,
  35. method: 'RSI',
  36. candleSize: 1,
  37. historySize: 3,
  38. adapter: 'sqlite'
  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. // Uses one of the momentum indicators but adjusts the thresholds when PPO is bullish or bearish
  90. // Uses settings from the ppo and momentum indicator config block
  91. config.varPPO = {
  92. momentum: 'TSI', // RSI, TSI or UO
  93. thresholds: {
  94. // new threshold is default threshold + PPOhist * PPOweight
  95. weightLow: 120,
  96. weightHigh: -120,
  97. // How many candle intervals should a trend persist
  98. // before we consider it real?
  99. persistence: 0
  100. }
  101. };
  102.  
  103. // RSI settings:
  104. config.RSI = {
  105. interval: 14,
  106. thresholds: {
  107. low: 30,
  108. high: 70,
  109. // How many candle intervals should a trend persist
  110. // before we consider it real?
  111. persistence: 1
  112. }
  113. };
  114.  
  115. // TSI settings:
  116. config.TSI = {
  117. short: 13,
  118. long: 25,
  119. thresholds: {
  120. low: -25,
  121. high: 25,
  122. // How many candle intervals should a trend persist
  123. // before we consider it real?
  124. persistence: 1
  125. }
  126. };
  127.  
  128. // Ultimate Oscillator Settings
  129. config.UO = {
  130. first: {weight: 4, period: 7},
  131. second: {weight: 2, period: 14},
  132. third: {weight: 1, period: 28},
  133. thresholds: {
  134. low: 30,
  135. high: 70,
  136. // How many candle intervals should a trend persist
  137. // before we consider it real?
  138. persistence: 1
  139. }
  140. };
  141.  
  142. // CCI Settings
  143. config.CCI = {
  144. constant: 0.015, // constant multiplier. 0.015 gets to around 70% fit
  145. history: 90, // history size, make same or smaller than history
  146. thresholds: {
  147. up: 100, // fixed values for overbuy upward trajectory
  148. down: -100, // fixed value for downward trajectory
  149. persistence: 0 // filter spikes by adding extra filters candles
  150. }
  151. };
  152.  
  153. // StochRSI settings
  154. config.StochRSI = {
  155. interval: 3,
  156. thresholds: {
  157. low: 20,
  158. high: 80,
  159. // How many candle intervals should a trend persist
  160. // before we consider it real?
  161. persistence: 3
  162. }
  163. };
  164.  
  165.  
  166. // custom settings:
  167. config.custom = {
  168. my_custom_setting: 10,
  169. }
  170.  
  171. config['talib-macd'] = {
  172. parameters: {
  173. optInFastPeriod: 10,
  174. optInSlowPeriod: 21,
  175. optInSignalPeriod: 9
  176. },
  177. thresholds: {
  178. down: -0.025,
  179. up: 0.025,
  180. }
  181. }
  182.  
  183. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  184. // CONFIGURING PLUGINS
  185. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  186.  
  187. // do you want Gekko to simulate the profit of the strategy's own advice?
  188. config.paperTrader = {
  189. enabled: true,
  190. // report the profit in the currency or the asset?
  191. reportInCurrency: true,
  192. // start balance, on what the current balance is compared with
  193. simulationBalance: {
  194. // these are in the unit types configured in the watcher.
  195. asset: 1,
  196. currency: 100,
  197. },
  198. // how much fee in % does each trade cost?
  199. feeMaker: 0.15,
  200. feeTaker: 0.25,
  201. feeUsing: 'maker',
  202. // how much slippage/spread should Gekko assume per trade?
  203. slippage: 0.05,
  204. }
  205.  
  206. config.performanceAnalyzer = {
  207. enabled: true,
  208. riskFreeReturn: 5
  209. }
  210.  
  211. // Want Gekko to perform real trades on buy or sell advice?
  212. // Enabling this will activate trades for the market being
  213. // watched by `config.watch`.
  214. config.trader = {
  215. enabled: false,
  216. key: '',
  217. secret: '',
  218. username: '', // your username, only required for specific exchanges.
  219. passphrase: '' // GDAX, requires a passphrase.
  220. }
  221.  
  222. config.adviceLogger = {
  223. enabled: true,
  224. muteSoft: true // disable advice printout if it's soft
  225. }
  226.  
  227. config.pushover = {
  228. enabled: false,
  229. sendPushoverOnStart: false,
  230. muteSoft: true, // disable advice printout if it's soft
  231. tag: '[GEKKO]',
  232. key: '',
  233. user: ''
  234. }
  235.  
  236. // want Gekko to send a mail on buy or sell advice?
  237. config.mailer = {
  238. enabled: true, // Send Emails if true, false to turn off
  239. sendMailOnStart: true, // Send 'Gekko starting' message if true, not if false
  240.  
  241. email: 'mymail@gmail.com', // Your Gmail address
  242. muteSoft: true, // disable advice printout if it's soft
  243.  
  244. // You don't have to set your password here, if you leave it blank we will ask it
  245. // when Gekko's starts.
  246. //
  247. // NOTE: Gekko is an open source project < https://github.com/askmike/gekko >,
  248. // make sure you looked at the code or trust the maintainer of this bot when you
  249. // fill in your email and password.
  250. //
  251. // WARNING: If you have NOT downloaded Gekko from the github page above we CANNOT
  252. // guarantuee that your email address & password are safe!
  253.  
  254. password: '', // Your Gmail Password - if not supplied Gekko will prompt on startup.
  255.  
  256. tag: '[GEKKO] ', // Prefix all email subject lines with this
  257.  
  258. // ADVANCED MAIL SETTINGS
  259. // you can leave those as is if you
  260. // just want to use Gmail
  261.  
  262. server: 'smtp.gmail.com', // The name of YOUR outbound (SMTP) mail server.
  263. smtpauth: true, // Does SMTP server require authentication (true for Gmail)
  264. // The following 3 values default to the Email (above) if left blank
  265. user: 'mymail', // Your Email server user name - usually your full Email address 'me@mydomain.com'
  266. from: 'mymail@gmail.com', // 'me@mydomain.com'
  267. to: 'mymail2@gmail.com', // 'me@somedomain.com, me@someotherdomain.com'
  268. ssl: true, // Use SSL (true for Gmail)
  269. port: '', // Set if you don't want to use the default port
  270. }
  271.  
  272. config.pushbullet = {
  273. // sends pushbullets if true
  274. enabled: false,
  275. // Send 'Gekko starting' message if true
  276. sendMessageOnStart: true,
  277. // disable advice printout if it's soft
  278. muteSoft: true,
  279. // your pushbullet API key
  280. key: 'xxx',
  281. // your email, change it unless you are Azor Ahai
  282. email: 'mymail2@gmail.org',
  283. // will make Gekko messages start mit [GEKKO]
  284. tag: '[GEKKO]'
  285. };
  286.  
  287. config.kodi = {
  288. // if you have a username & pass, add it like below
  289. // http://user:pass@ip-or-hostname:8080/jsonrpc
  290. host: 'http://ip-or-hostname:8080/jsonrpc',
  291. enabled: false,
  292. sendMessageOnStart: true,
  293. }
  294.  
  295. config.ircbot = {
  296. enabled: false,
  297. emitUpdates: false,
  298. muteSoft: true,
  299. channel: '#your-channel',
  300. server: 'irc.freenode.net',
  301. botName: 'gekkobot'
  302. }
  303.  
  304. config.telegrambot = {
  305. enabled: true,
  306. emitUpdates: true,
  307. token: '',
  308. botName: 'WhaleMaster'
  309. }
  310.  
  311. config.twitter = {
  312. // sends pushbullets if true
  313. enabled: false,
  314. // Send 'Gekko starting' message if true
  315. sendMessageOnStart: false,
  316. // disable advice printout if it's soft
  317. muteSoft: false,
  318. tag: '[GEKKO]',
  319. // twitter consumer key
  320. consumer_key: '',
  321. // twitter consumer secret
  322. consumer_secret: '',
  323. // twitter access token key
  324. access_token_key: '',
  325. // twitter access token secret
  326. access_token_secret: ''
  327. };
  328.  
  329. config.xmppbot = {
  330. enabled: false,
  331. emitUpdates: false,
  332. client_id: 'jabber_id',
  333. client_pwd: 'jabber_pw',
  334. client_host: 'jabber_server',
  335. client_port: 5222,
  336. status_msg: 'I\'m online',
  337. receiver: 'jabber_id_for_updates'
  338. }
  339.  
  340. config.campfire = {
  341. enabled: false,
  342. emitUpdates: false,
  343. nickname: 'Gordon',
  344. roomId: null,
  345. apiKey: '',
  346. account: ''
  347. }
  348.  
  349. config.redisBeacon = {
  350. enabled: false,
  351. port: 6379, // redis default
  352. host: '127.0.0.1', // localhost
  353. // On default Gekko broadcasts
  354. // events in the channel with
  355. // the name of the event, set
  356. // an optional prefix to the
  357. // channel name.
  358. channelPrefix: '',
  359. broadcast: [
  360. 'candle'
  361. ]
  362. }
  363.  
  364. config.slack = {
  365. enabled: false,
  366. token: '',
  367. sendMessageOnStart: true,
  368. muteSoft: true,
  369. channel: '' // #tradebot
  370. }
  371.  
  372. config.ifttt = {
  373. enabled: false,
  374. eventName: 'gekko',
  375. makerKey: '',
  376. muteSoft: true,
  377. sendMessageOnStart: true
  378. }
  379.  
  380. config.candleWriter = {
  381. enabled: false
  382. }
  383.  
  384. config.adviceWriter = {
  385. enabled: false,
  386. muteSoft: true,
  387. }
  388.  
  389. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  390. // CONFIGURING ADAPTER
  391. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  392.  
  393. config.adapter = 'sqlite';
  394.  
  395. config.sqlite = {
  396. path: 'plugins/sqlite',
  397.  
  398. dataDirectory: 'history',
  399. version: 0.1,
  400.  
  401. journalMode: require('./web/isWindows.js') ? 'DELETE' : 'WAL',
  402.  
  403. dependencies: []
  404. }
  405.  
  406. // Postgres adapter example config (please note: requires postgres >= 9.5):
  407. config.postgresql = {
  408. path: 'plugins/postgresql',
  409. version: 0.1,
  410. connectionString: 'postgres://user:pass@localhost:5432', // if default port
  411. database: null, // if set, we'll put all tables into a single database.
  412. schema: 'public',
  413. dependencies: [{
  414. module: 'pg',
  415. version: '6.1.0'
  416. }]
  417. }
  418.  
  419. // Mongodb adapter, requires mongodb >= 3.3 (no version earlier tested)
  420. config.mongodb = {
  421. path: 'plugins/mongodb',
  422. version: 0.1,
  423. connectionString: 'mongodb://mongodb/gekko', // connection to mongodb server
  424. dependencies: [{
  425. module: 'mongojs',
  426. version: '2.4.0'
  427. }]
  428. }
  429.  
  430. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  431. // CONFIGURING BACKTESTING
  432. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  433.  
  434. // Note that these settings are only used in backtesting mode, see here:
  435. // @link: https://gekko.wizb.it/docs/commandline/backtesting.html
  436.  
  437. config.backtest = {
  438. daterange: 'scan',
  439. batchSize: 50
  440. }
  441.  
  442. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  443. // CONFIGURING IMPORTING
  444. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  445.  
  446. config.importer = {
  447. daterange: {
  448. // NOTE: these dates are in UTC
  449. from: "2018-01-01 00:00:00"
  450. }
  451. }
  452.  
  453. // set this to true if you understand that Gekko will
  454. // invest according to how you configured the indicators.
  455. // None of the advice in the output is Gekko telling you
  456. // to take a certain position. Instead it is the result
  457. // of running the indicators you configured automatically.
  458. //
  459. // In other words: Gekko automates your trading strategies,
  460. // it doesn't advice on itself, only set to true if you truly
  461. // understand this.
  462. //
  463. // Not sure? Read this first: https://github.com/askmike/gekko/issues/201
  464. config['I understand that Gekko only automates MY OWN trading strategies'] = false;
  465.  
  466. module.exports = config;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement