Guest User

NewConfig

a guest
Jan 12th, 2019
1,902
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 '[email protected]'
  200. from: '', // '[email protected]'
  201. ssl: true, // Use SSL (true for Gmail)
  202. port: '', // Set if you don't want to use the default port
  203. }
  204.  
  205. config.pushbullet = {
  206. // sends pushbullets if true
  207. enabled: false,
  208. // Send 'Gekko starting' message if true
  209. sendMessageOnStart: true,
  210. // Send Message for advice? Recommend Flase for paper, true for live
  211. sendOnAdvice: true,
  212. // Send Message on Trade Completion?
  213. sendOnTrade: true,
  214. // For Overall P/L calc. Pass in old balance if desired, else leave '0'
  215. startingBalance: 0,
  216. // your pushbullet API key
  217. key: '',
  218. // your email
  219. email: '[email protected]',
  220. // Messages will start with this tag
  221. tag: '[GEKKO]'
  222. };
  223.  
  224. config.kodi = {
  225. // if you have a username & pass, add it like below
  226. // http://user:pass@ip-or-hostname:8080/jsonrpc
  227. host: 'http://ip-or-hostname:8080/jsonrpc',
  228. enabled: false,
  229. sendMessageOnStart: true,
  230. }
  231.  
  232. config.ircbot = {
  233. enabled: false,
  234. emitUpdates: false,
  235. muteSoft: true,
  236. channel: '#your-channel',
  237. server: 'irc.freenode.net',
  238. botName: 'gekkobot'
  239. }
  240.  
  241. config.telegrambot = {
  242. enabled: false,
  243. // Receive notifications for trades and warnings/errors related to trading
  244. emitTrades: false,
  245. token: 'YOUR_TELEGRAM_BOT_TOKEN',
  246. };
  247.  
  248. config.twitter = {
  249. // sends pushbullets if true
  250. enabled: false,
  251. // Send 'Gekko starting' message if true
  252. sendMessageOnStart: false,
  253. // disable advice printout if it's soft
  254. muteSoft: false,
  255. tag: '[GEKKO]',
  256. // twitter consumer key
  257. consumer_key: '',
  258. // twitter consumer secret
  259. consumer_secret: '',
  260. // twitter access token key
  261. access_token_key: '',
  262. // twitter access token secret
  263. access_token_secret: ''
  264. };
  265.  
  266. config.xmppbot = {
  267. enabled: false,
  268. emitUpdates: false,
  269. client_id: 'jabber_id',
  270. client_pwd: 'jabber_pw',
  271. client_host: 'jabber_server',
  272. client_port: 5222,
  273. status_msg: 'I\'m online',
  274. receiver: 'jabber_id_for_updates'
  275. }
  276.  
  277. config.campfire = {
  278. enabled: false,
  279. emitUpdates: false,
  280. nickname: 'Gordon',
  281. roomId: null,
  282. apiKey: '',
  283. account: ''
  284. }
  285.  
  286. config.redisBeacon = {
  287. enabled: false,
  288. port: 6379, // redis default
  289. host: '127.0.0.1', // localhost
  290. // On default Gekko broadcasts
  291. // events in the channel with
  292. // the name of the event, set
  293. // an optional prefix to the
  294. // channel name.
  295. channelPrefix: '',
  296. broadcast: [
  297. 'candle'
  298. ]
  299. }
  300.  
  301. config.slack = {
  302. enabled: false,
  303. token: '',
  304. sendMessageOnStart: true,
  305. muteSoft: true,
  306. channel: '' // #tradebot
  307. }
  308.  
  309. config.ifttt = {
  310. enabled: false,
  311. eventName: 'gekko',
  312. makerKey: '',
  313. muteSoft: true,
  314. sendMessageOnStart: true
  315. }
  316.  
  317. config.candleWriter = {
  318. enabled: true
  319. }
  320.  
  321. config.adviceWriter = {
  322. enabled: true,
  323. muteSoft: true,
  324. }
  325.  
  326. config.backtestResultExporter = {
  327. enabled: true,
  328. writeToDisk: true,
  329. data: {
  330. stratUpdates: false,
  331. portfolioValues: true,
  332. stratCandles: true,
  333. roundtrips: true,
  334. trades: true
  335. }
  336. }
  337.  
  338. config.candleUploader = {
  339. enabled: false,
  340. url: '',
  341. apiKey: ''
  342. }
  343.  
  344. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  345. // CONFIGURING ADAPTER
  346. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  347.  
  348. config.adapter = 'postgresql';
  349.  
  350. config.sqlite = {
  351. path: 'plugins/sqlite',
  352.  
  353. dataDirectory: 'history',
  354. version: 0.1,
  355.  
  356. journalMode: require('./web/isWindows.js') ? 'DELETE' : 'WAL',
  357.  
  358. dependencies: []
  359. }
  360.  
  361. // Postgres adapter example config (please note: requires postgres >= 9.5):
  362. config.postgresql = {
  363. path: 'plugins/postgresql',
  364. version: 0.1,
  365. connectionString: 'postgres://gekkodbuser:1234@localhost:5432', // if default port
  366. database: null, // if set, we'll put all tables into a single database.
  367. schema: 'public',
  368. dependencies: [{
  369. module: 'pg',
  370. version: '7.4.3'
  371. }]
  372. }
  373.  
  374. // Mongodb adapter, requires mongodb >= 3.3 (no version earlier tested)
  375. config.mongodb = {
  376. path: 'plugins/mongodb',
  377. version: 0.1,
  378. connectionString: 'mongodb://localhost/gekko', // connection to mongodb server
  379. dependencies: [{
  380. module: 'mongojs',
  381. version: '2.4.0'
  382. }]
  383. }
  384.  
  385. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  386. // CONFIGURING BACKTESTING
  387. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  388.  
  389. // Note that these settings are only used in backtesting mode, see here:
  390. // @link: https://gekko.wizb.it/docs/commandline/backtesting.html
  391.  
  392. config.backtest = {
  393. // daterange: 'scan',
  394. daterange: {
  395. from: "2018-12-01T00:00:00+02:00",
  396. to: "2019-01-01T09:00:00+02:00"
  397. },
  398. batchSize: 1
  399. }
  400.  
  401. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  402. // CONFIGURING IMPORTING
  403. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  404.  
  405. config.importer = {
  406. daterange: {
  407. // NOTE: these dates are in UTC
  408. from: "2018-12-01T00:00:00+02:00",
  409. to: "2019-01-01T09:00:00+02:00"
  410. }
  411. }
  412.  
  413.  
  414. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  415. // OTHER STRATEGY SETTINGS
  416. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  417.  
  418. // Exponential Moving Averages settings:
  419. config.DEMA = {
  420. // EMA weight (α)
  421. // the higher the weight, the more smooth (and delayed) the line
  422. weight: 21,
  423. // amount of candles to remember and base initial EMAs on
  424. // the difference between the EMAs (to act as triggers)
  425. thresholds: {
  426. down: -0.025,
  427. up: 0.025
  428. }
  429. };
  430.  
  431. // PPO settings:
  432. config.PPO = {
  433. // EMA weight (α)
  434. // the higher the weight, the more smooth (and delayed) the line
  435. short: 12,
  436. long: 26,
  437. signal: 9,
  438. // the difference between the EMAs (to act as triggers)
  439. thresholds: {
  440. down: -0.025,
  441. up: 0.025,
  442. // How many candle intervals should a trend persist
  443. // before we consider it real?
  444. persistence: 2
  445. }
  446. };
  447.  
  448. // Uses one of the momentum indicators but adjusts the thresholds when PPO is bullish or bearish
  449. // Uses settings from the ppo and momentum indicator config block
  450. config.varPPO = {
  451. momentum: 'TSI', // RSI, TSI or UO
  452. thresholds: {
  453. // new threshold is default threshold + PPOhist * PPOweight
  454. weightLow: 120,
  455. weightHigh: -120,
  456. // How many candle intervals should a trend persist
  457. // before we consider it real?
  458. persistence: 0
  459. }
  460. };
  461.  
  462. // RSI settings:
  463. config.RSI = {
  464. interval: 14,
  465. thresholds: {
  466. low: 30,
  467. high: 70,
  468. // How many candle intervals should a trend persist
  469. // before we consider it real?
  470. persistence: 1
  471. }
  472. };
  473.  
  474. // TSI settings:
  475. config.TSI = {
  476. short: 13,
  477. long: 25,
  478. thresholds: {
  479. low: -25,
  480. high: 25,
  481. // How many candle intervals should a trend persist
  482. // before we consider it real?
  483. persistence: 1
  484. }
  485. };
  486.  
  487. // Ultimate Oscillator Settings
  488. config.UO = {
  489. first: {
  490. weight: 4,
  491. period: 7
  492. },
  493. second: {
  494. weight: 2,
  495. period: 14
  496. },
  497. third: {
  498. weight: 1,
  499. period: 28
  500. },
  501. thresholds: {
  502. low: 30,
  503. high: 70,
  504. // How many candle intervals should a trend persist
  505. // before we consider it real?
  506. persistence: 1
  507. }
  508. };
  509.  
  510. // CCI Settings
  511. config.CCI = {
  512. constant: 0.015, // constant multiplier. 0.015 gets to around 70% fit
  513. history: 90, // history size, make same or smaller than history
  514. thresholds: {
  515. up: 100, // fixed values for overbuy upward trajectory
  516. down: -100, // fixed value for downward trajectory
  517. persistence: 0 // filter spikes by adding extra filters candles
  518. }
  519. };
  520.  
  521. // StochRSI settings
  522. config.StochRSI = {
  523. interval: 3,
  524. thresholds: {
  525. low: 20,
  526. high: 80,
  527. // How many candle intervals should a trend persist
  528. // before we consider it real?
  529. persistence: 3
  530. }
  531. };
  532.  
  533.  
  534. // custom settings:
  535. config.custom = {
  536. my_custom_setting: 10,
  537. }
  538.  
  539. config['talib-macd'] = {
  540. parameters: {
  541. optInFastPeriod: 10,
  542. optInSlowPeriod: 21,
  543. optInSignalPeriod: 9
  544. },
  545. thresholds: {
  546. down: -0.025,
  547. up: 0.025,
  548. }
  549. }
  550.  
  551. config['talib-macd'] = {
  552. parameters: {
  553. optInFastPeriod: 10,
  554. optInSlowPeriod: 21,
  555. optInSignalPeriod: 9
  556. },
  557. thresholds: {
  558. down: -0.025,
  559. up: 0.025,
  560. }
  561. }
  562.  
  563. config['tulip-adx'] = {
  564. optInTimePeriod: 10,
  565. thresholds: {
  566. down: -0.025,
  567. up: 0.025,
  568. }
  569. }
  570.  
  571.  
  572. // set this to true if you understand that Gekko will
  573. // invest according to how you configured the indicators.
  574. // None of the advice in the output is Gekko telling you
  575. // to take a certain position. Instead it is the result
  576. // of running the indicators you configured automatically.
  577. //
  578. // In other words: Gekko automates your trading strategies,
  579. // it doesn't advice on itself, only set to true if you truly
  580. // understand this.
  581. //
  582. // Not sure? Read this first: https://github.com/askmike/gekko/issues/201
  583. config['I understand that Gekko only automates MY OWN trading strategies'] = true;
  584.  
  585. module.exports = config;
Advertisement
Add Comment
Please, Sign In to add comment