Advertisement
Guest User

NewConfig

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