Advertisement
Guest User

Untitled

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