Advertisement
Guest User

sample-config.js

a guest
Jan 10th, 2019
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.28 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 = false; // 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: 'TRX',
  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: 'SobhV5',
  36. candleSize: 1,
  37. historySize: 14,
  38. }
  39.  
  40.  
  41.  
  42. config.T5mainasync = {
  43. setTakerLimit: '1%',
  44. setSellAmount: '100%',
  45. setBuyAmount: '99%',
  46. MACD: {
  47. optInFastPeriod: 12,
  48. optInSlowPeriod: 26,
  49. optInSignalPeriod: 9
  50. },
  51. EMAshort: {
  52. optInTimePeriod: 9
  53. },
  54. EMAlong: {
  55. optInTimePeriod: 21
  56. },
  57. STOCH: {
  58. optInFastKPeriod: 12,
  59. optInSlowKPeriod: 3,
  60. optInSlowDPeriod: 3
  61. },
  62. RSI: {
  63. optInTimePeriod: 14
  64. },
  65. thresholds: {
  66. RSIhigh: 66,
  67. RSIlow: 44,
  68. MACDhigh: 0,
  69. MACDlow: 0.88,
  70. persistance: 1
  71. }
  72. };
  73.  
  74. config.SobhV5=
  75. {
  76. MACD: {
  77. optInFastPeriod: 12,
  78. optInSlowPeriod: 26,
  79. optInSignalPeriod: 9
  80. },
  81. RSI: {
  82. optInTimePeriod:14,
  83. },
  84. MFI: {
  85. optInTimePeriod:14,
  86. },
  87. };
  88.  
  89.  
  90. // MACD settings:
  91. config.MACD = {
  92. // EMA weight (α)
  93. // the higher the weight, the more smooth (and delayed) the line
  94. short: 10,
  95. long: 21,
  96. signal: 9,
  97. // the difference between the EMAs (to act as triggers)
  98. thresholds: {
  99. down: -0.025,
  100. up: 0.025,
  101. // How many candle intervals should a trend persist
  102. // before we consider it real?
  103. persistence: 1
  104. }
  105. };
  106.  
  107. // settings for other strategies can be found at the bottom, note that only
  108. // one strategy is active per gekko, the other settings are ignored.
  109.  
  110. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  111. // CONFIGURING PLUGINS
  112. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  113.  
  114. // do you want Gekko to simulate the profit of the strategy's own advice?
  115. config.paperTrader = {
  116. enabled: true,
  117. // report the profit in the currency or the asset?
  118. reportInCurrency: true,
  119. // start balance, on what the current balance is compared with
  120. simulationBalance: {
  121. // these are in the unit types configured in the watcher.
  122. asset: 1,
  123. currency: 100,
  124. },
  125. // how much fee in % does each trade cost?
  126. feeMaker: 0.15,
  127. feeTaker: 0.25,
  128. feeUsing: 'maker',
  129. // how much slippage/spread should Gekko assume per trade?
  130. slippage: 0.05,
  131. }
  132.  
  133. config.performanceAnalyzer = {
  134. enabled: true,
  135. riskFreeReturn: 5
  136. }
  137.  
  138. // Want Gekko to perform real trades on buy or sell advice?
  139. // Enabling this will activate trades for the market being
  140. // watched by `config.watch`.
  141. config.trader = {
  142. enabled: false,
  143. key: '',
  144. secret: '',
  145. username: '', // your username, only required for specific exchanges.
  146. passphrase: '', // GDAX, requires a passphrase.
  147. }
  148.  
  149. config.eventLogger = {
  150. enabled: true,
  151. // optionally pass a whitelist of events to log, if not past
  152. // the eventLogger will log _all_ events.
  153. // whitelist: ['portfolioChange', 'portfolioValueChange']
  154. }
  155.  
  156. config.pushover = {
  157. enabled: false,
  158. sendPushoverOnStart: false,
  159. muteSoft: true, // disable advice printout if it's soft
  160. tag: '[GEKKO]',
  161. key: '',
  162. user: ''
  163. }
  164.  
  165. // want Gekko to send a mail on buy or sell advice?
  166. config.mailer = {
  167. enabled: false, // Send Emails if true, false to turn off
  168. sendMailOnStart: true, // Send 'Gekko starting' message if true, not if false
  169.  
  170. email: '', // Your Gmail address
  171. muteSoft: true, // disable advice printout if it's soft
  172.  
  173. // You don't have to set your password here, if you leave it blank we will ask it
  174. // when Gekko's starts.
  175. //
  176. // NOTE: Gekko is an open source project < https://github.com/askmike/gekko >,
  177. // make sure you looked at the code or trust the maintainer of this bot when you
  178. // fill in your email and password.
  179. //
  180. // WARNING: If you have NOT downloaded Gekko from the github page above we CANNOT
  181. // guarantuee that your email address & password are safe!
  182.  
  183. password: '', // Your Gmail Password - if not supplied Gekko will prompt on startup.
  184.  
  185. tag: '[GEKKO] ', // Prefix all email subject lines with this
  186.  
  187. // ADVANCED MAIL SETTINGS
  188. // you can leave those as is if you
  189. // just want to use Gmail
  190.  
  191. server: 'smtp.gmail.com', // The name of YOUR outbound (SMTP) mail server.
  192. smtpauth: true, // Does SMTP server require authentication (true for Gmail)
  193. // The following 3 values default to the Email (above) if left blank
  194. user: '', // Your Email server user name - usually your full Email address 'me@mydomain.com'
  195. from: '', // 'me@mydomain.com'
  196. to: '', // 'me@somedomain.com, me@someotherdomain.com'
  197. ssl: true, // Use SSL (true for Gmail)
  198. port: '', // Set if you don't want to use the default port
  199. }
  200.  
  201. config.pushbullet = {
  202. // sends pushbullets if true
  203. enabled: false,
  204. // Send 'Gekko starting' message if true
  205. sendMessageOnStart: true,
  206. // Send Message for advice? Recommend Flase for paper, true for live
  207. sendOnAdvice: true,
  208. // Send Message on Trade Completion?
  209. sendOnTrade: true,
  210. // For Overall P/L calc. Pass in old balance if desired, else leave '0'
  211. startingBalance: 0,
  212. // your pushbullet API key
  213. key: '',
  214. // your email
  215. email: 'jon_snow@westeros.com',
  216. // Messages will start with this tag
  217. tag: '[GEKKO]'
  218. };
  219.  
  220. config.kodi = {
  221. // if you have a username & pass, add it like below
  222. // http://user:pass@ip-or-hostname:8080/jsonrpc
  223. host: 'http://ip-or-hostname:8080/jsonrpc',
  224. enabled: false,
  225. sendMessageOnStart: true,
  226. }
  227.  
  228. config.ircbot = {
  229. enabled: false,
  230. emitUpdates: false,
  231. muteSoft: true,
  232. channel: '#your-channel',
  233. server: 'irc.freenode.net',
  234. botName: 'gekkobot'
  235. }
  236.  
  237. config.telegrambot = {
  238. enabled: false,
  239. // Receive notifications for trades and warnings/errors related to trading
  240. emitTrades: false,
  241. token: 'YOUR_TELEGRAM_BOT_TOKEN',
  242. };
  243.  
  244. config.twitter = {
  245. // sends pushbullets if true
  246. enabled: false,
  247. // Send 'Gekko starting' message if true
  248. sendMessageOnStart: false,
  249. // disable advice printout if it's soft
  250. muteSoft: false,
  251. tag: '[GEKKO]',
  252. // twitter consumer key
  253. consumer_key: '',
  254. // twitter consumer secret
  255. consumer_secret: '',
  256. // twitter access token key
  257. access_token_key: '',
  258. // twitter access token secret
  259. access_token_secret: ''
  260. };
  261.  
  262. config.xmppbot = {
  263. enabled: false,
  264. emitUpdates: false,
  265. client_id: 'jabber_id',
  266. client_pwd: 'jabber_pw',
  267. client_host: 'jabber_server',
  268. client_port: 5222,
  269. status_msg: 'I\'m online',
  270. receiver: 'jabber_id_for_updates'
  271. }
  272.  
  273. config.campfire = {
  274. enabled: false,
  275. emitUpdates: false,
  276. nickname: 'Gordon',
  277. roomId: null,
  278. apiKey: '',
  279. account: ''
  280. }
  281.  
  282. config.redisBeacon = {
  283. enabled: false,
  284. port: 6379, // redis default
  285. host: '127.0.0.1', // localhost
  286. // On default Gekko broadcasts
  287. // events in the channel with
  288. // the name of the event, set
  289. // an optional prefix to the
  290. // channel name.
  291. channelPrefix: '',
  292. broadcast: [
  293. 'candle'
  294. ]
  295. }
  296.  
  297. config.slack = {
  298. enabled: false,
  299. token: '',
  300. sendMessageOnStart: true,
  301. muteSoft: true,
  302. channel: '' // #tradebot
  303. }
  304.  
  305. config.ifttt = {
  306. enabled: false,
  307. eventName: 'gekko',
  308. makerKey: '',
  309. muteSoft: true,
  310. sendMessageOnStart: true
  311. }
  312.  
  313. config.candleWriter = {
  314. enabled: true
  315. }
  316.  
  317. config.adviceWriter = {
  318. enabled: true,
  319. muteSoft: true,
  320. }
  321.  
  322. config.backtestResultExporter = {
  323. enabled: true,
  324. writeToDisk: true,
  325. data: {
  326. stratUpdates: false,
  327. portfolioValues: true,
  328. stratCandles: true,
  329. roundtrips: true,
  330. trades: true
  331. }
  332. }
  333.  
  334. config.candleUploader = {
  335. enabled: false,
  336. url: '',
  337. apiKey: ''
  338. }
  339.  
  340. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  341. // CONFIGURING ADAPTER
  342. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  343.  
  344. config.adapter = 'postgresql';
  345.  
  346. config.sqlite = {
  347. path: 'plugins/sqlite',
  348.  
  349. dataDirectory: 'history',
  350. version: 0.1,
  351.  
  352. journalMode: require('./web/isWindows.js') ? 'DELETE' : 'WAL',
  353.  
  354. dependencies: []
  355. }
  356.  
  357. // Postgres adapter example config (please note: requires postgres >= 9.5):
  358. config.postgresql = {
  359. path: 'plugins/postgresql',
  360. version: 0.1,
  361. connectionString: 'postgres://gekkodbuser:1234@localhost:5432', // if default port
  362. database: null, // if set, we'll put all tables into a single database.
  363. schema: 'public',
  364. dependencies: [{
  365. module: 'pg',
  366. version: '7.4.3'
  367. }]
  368. }
  369.  
  370. // Mongodb adapter, requires mongodb >= 3.3 (no version earlier tested)
  371. config.mongodb = {
  372. path: 'plugins/mongodb',
  373. version: 0.1,
  374. connectionString: 'mongodb://localhost/gekko', // connection to mongodb server
  375. dependencies: [{
  376. module: 'mongojs',
  377. version: '2.4.0'
  378. }]
  379. }
  380.  
  381. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  382. // CONFIGURING BACKTESTING
  383. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  384.  
  385. // Note that these settings are only used in backtesting mode, see here:
  386. // @link: https://gekko.wizb.it/docs/commandline/backtesting.html
  387.  
  388. config.backtest = {
  389. // daterange: 'scan',
  390. daterange: {
  391. from: "2018-12-01T00:00:00+02:00",
  392. to: "2019-01-01T09:00:00+02:00"
  393. },
  394. batchSize: 50
  395. }
  396.  
  397. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  398. // CONFIGURING IMPORTING
  399. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  400.  
  401. config.importer = {
  402. daterange: {
  403. // NOTE: these dates are in UTC
  404. from: "2018-12-01T00:00:00+02:00",
  405. to: "2019-01-01T09:00:00+02:00"
  406. }
  407. }
  408.  
  409.  
  410. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  411. // OTHER STRATEGY SETTINGS
  412. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  413.  
  414. // Exponential Moving Averages settings:
  415. config.DEMA = {
  416. // EMA weight (α)
  417. // the higher the weight, the more smooth (and delayed) the line
  418. weight: 21,
  419. // amount of candles to remember and base initial EMAs on
  420. // the difference between the EMAs (to act as triggers)
  421. thresholds: {
  422. down: -0.025,
  423. up: 0.025
  424. }
  425. };
  426.  
  427. // PPO settings:
  428. config.PPO = {
  429. // EMA weight (α)
  430. // the higher the weight, the more smooth (and delayed) the line
  431. short: 12,
  432. long: 26,
  433. signal: 9,
  434. // the difference between the EMAs (to act as triggers)
  435. thresholds: {
  436. down: -0.025,
  437. up: 0.025,
  438. // How many candle intervals should a trend persist
  439. // before we consider it real?
  440. persistence: 2
  441. }
  442. };
  443.  
  444. // Uses one of the momentum indicators but adjusts the thresholds when PPO is bullish or bearish
  445. // Uses settings from the ppo and momentum indicator config block
  446. config.varPPO = {
  447. momentum: 'TSI', // RSI, TSI or UO
  448. thresholds: {
  449. // new threshold is default threshold + PPOhist * PPOweight
  450. weightLow: 120,
  451. weightHigh: -120,
  452. // How many candle intervals should a trend persist
  453. // before we consider it real?
  454. persistence: 0
  455. }
  456. };
  457.  
  458. // RSI settings:
  459. config.RSI = {
  460. interval: 14,
  461. thresholds: {
  462. low: 30,
  463. high: 70,
  464. // How many candle intervals should a trend persist
  465. // before we consider it real?
  466. persistence: 1
  467. }
  468. };
  469.  
  470. // TSI settings:
  471. config.TSI = {
  472. short: 13,
  473. long: 25,
  474. thresholds: {
  475. low: -25,
  476. high: 25,
  477. // How many candle intervals should a trend persist
  478. // before we consider it real?
  479. persistence: 1
  480. }
  481. };
  482.  
  483. // Ultimate Oscillator Settings
  484. config.UO = {
  485. first: {
  486. weight: 4,
  487. period: 7
  488. },
  489. second: {
  490. weight: 2,
  491. period: 14
  492. },
  493. third: {
  494. weight: 1,
  495. period: 28
  496. },
  497. thresholds: {
  498. low: 30,
  499. high: 70,
  500. // How many candle intervals should a trend persist
  501. // before we consider it real?
  502. persistence: 1
  503. }
  504. };
  505.  
  506. // CCI Settings
  507. config.CCI = {
  508. constant: 0.015, // constant multiplier. 0.015 gets to around 70% fit
  509. history: 90, // history size, make same or smaller than history
  510. thresholds: {
  511. up: 100, // fixed values for overbuy upward trajectory
  512. down: -100, // fixed value for downward trajectory
  513. persistence: 0 // filter spikes by adding extra filters candles
  514. }
  515. };
  516.  
  517. // StochRSI settings
  518. config.StochRSI = {
  519. interval: 3,
  520. thresholds: {
  521. low: 20,
  522. high: 80,
  523. // How many candle intervals should a trend persist
  524. // before we consider it real?
  525. persistence: 3
  526. }
  527. };
  528.  
  529.  
  530. // custom settings:
  531. config.custom = {
  532. my_custom_setting: 10,
  533. }
  534.  
  535. config['talib-macd'] = {
  536. parameters: {
  537. optInFastPeriod: 10,
  538. optInSlowPeriod: 21,
  539. optInSignalPeriod: 9
  540. },
  541. thresholds: {
  542. down: -0.025,
  543. up: 0.025,
  544. }
  545. }
  546.  
  547. config['talib-macd'] = {
  548. parameters: {
  549. optInFastPeriod: 10,
  550. optInSlowPeriod: 21,
  551. optInSignalPeriod: 9
  552. },
  553. thresholds: {
  554. down: -0.025,
  555. up: 0.025,
  556. }
  557. }
  558.  
  559. config['tulip-adx'] = {
  560. optInTimePeriod: 10,
  561. thresholds: {
  562. down: -0.025,
  563. up: 0.025,
  564. }
  565. }
  566.  
  567.  
  568. // set this to true if you understand that Gekko will
  569. // invest according to how you configured the indicators.
  570. // None of the advice in the output is Gekko telling you
  571. // to take a certain position. Instead it is the result
  572. // of running the indicators you configured automatically.
  573. //
  574. // In other words: Gekko automates your trading strategies,
  575. // it doesn't advice on itself, only set to true if you truly
  576. // understand this.
  577. //
  578. // Not sure? Read this first: https://github.com/askmike/gekko/issues/201
  579. config['I understand that Gekko only automates MY OWN trading strategies'] = false;
  580.  
  581. module.exports = config;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement