Advertisement
Guest User

Untitled

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