Advertisement
Guest User

Untitled

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