askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.07k stars 3.94k forks source link

Soooo.... #594

Closed DrBlackross closed 7 years ago

DrBlackross commented 7 years ago

Gekko only trades one way?

Btc -> usdt And not the other way around?

askmike commented 7 years ago

It trades both ways. If you have a question based on either observed behaviour or documentation, please be more clear.

DrBlackross commented 7 years ago

I've only ever seen it trade one way....

2017-02-20 07:22:18 (INFO): trading at Poloniex ACTIVE 2017-02-20 07:22:18 (INFO): Poloniex trading fee will be: 0.25% 2017-02-20 07:22:18 (INFO): Poloniex portfolio: 2017-02-20 07:22:18 (INFO): BTC: 0.000000000000 2017-02-20 07:22:18 (INFO): USDT: 52.617831120000 2017-02-20 07:22:18 (INFO): Setting up: 2017-02-20 07:22:18 (INFO): Advice logger 2017-02-20 07:22:18 (INFO): 2017-02-20 07:22:18 (INFO): Setting up: 2017-02-20 07:22:18 (INFO): Profit Simulator 2017-02-20 07:22:18 (INFO): Paper trader that logs fake profits. 2017-02-20 07:22:18 (INFO):

2017-02-20 07:22:18 (INFO): Starting to watch the market: Poloniex / 2017-02-20 07:23:19 (INFO): Trader Received advice to go short. Selling BTC

2017-02-20 07:23:19 (INFO): We have new trading advice! 2017-02-20 07:23:19 (INFO): Position: short 2017-02-20 07:23:19 (INFO): Market price: 1059.99999999 2017-02-20 07:23:19 (INFO): Based on market time: 2017-02-20 12:20:00

2017-02-20 07:23:19 (INFO): (PROFIT REPORT) original simulated balance: 1158.50000 USDT 2017-02-20 07:23:19 (INFO): (PROFIT REPORT) current simulated balance: 1156.82000 USDT 2017-02-20 07:23:19 (INFO): (PROFIT REPORT) simulated profit: -1.68000 USDT (-0.14502%) 2017-02-20 07:23:19 (INFO): Wanted to buy USDT but the amount is to small (0.000000000000) at Poloniex

I have lets say $52 here, but i only ever see

Wanted to buy USDT but the amount is to small (0.000000000000) at Poloniex

Sooo i manually sell usdt for btc, then after that it'll sell btc for usdt not problem

DrBlackross commented 7 years ago

(This is from this mornings restart, and using the poloniex branch of gekko)

askmike commented 7 years ago

These logs show a paper trader (simulation) and a real trader. The simulator is selling BTC for USD just fine.

Why it is not working appears related to poloniex:

Please upload your config and link to it (without your API keys).

Regards, Mike

On Mon, Feb 20, 2017 at 12:36 PM, DrBlackross notifications@github.com wrote:

(This is from this mornings restart, and using the poloniex branch of gekko)

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/askmike/gekko/issues/594#issuecomment-281068453, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7MDyJG9U9kD_lYYtClULNmrbs-htu0ks5reYiwgaJpZM4MGHK0 .

-- PGP key at keybase.io/mikevanrossum https://keybase.io/mikevanrossum/key.asc

DrBlackross commented 7 years ago

No sells btc just fine, lol, just will not use usdt to buy btc on poloniex... have no idea why it does this.

// Everything is explained here: // @link https://github.com/askmike/gekko/blob/stable/docs/Configuring_gekko.md

var config = {};

// ~~~~~~~~~~~~~~~~ // GENERAL SETTINGS // ~~~~~~~~~~~~~~~~

config.debug = false; // for additional logging / debugging

// ~~~~~~~~~~~~~~~~ // WATCHING A MARKET // ~~~~~~~~~~~~~~~~

// Monitor the live market config.watch = {

// see https://github.com/askmike/gekko#supported-exchanges exchange: 'poloniex', currency: 'USDT', asset: 'BTC' }

// ~~~~~~~~~~~~~~~~ // CONFIGURING TRADING ADVICE // ~~~~~~~~~~~~~~~~

config.tradingAdvisor = { enabled: true, method: 'RSI', candleSize: 20, historySize: 30, adapter: 'sqlite', talib: { enabled: false, version: '1.0.2' } }

// Exponential Moving Averages settings: config.DEMA = { // EMA weight (α) // the higher the weight, the more smooth (and delayed) the line short: 10, long: 21, // amount of candles to remember and base initial EMAs on // the difference between the EMAs (to act as triggers) thresholds: { down: -0.025, up: 0.025 } };

// MACD settings: config.MACD = { // EMA weight (α) // the higher the weight, the more smooth (and delayed) the line short: 10, long: 21, signal: 9, // the difference between the EMAs (to act as triggers) thresholds: { down: -0.025, up: 0.025, // How many candle intervals should a trend persist // before we consider it real? persistence: 1 } };

// PPO settings: config.PPO = { // EMA weight (α) // the higher the weight, the more smooth (and delayed) the line short: 12, long: 26, signal: 9, // the difference between the EMAs (to act as triggers) thresholds: { down: -0.025, up: 0.025, // How many candle intervals should a trend persist // before we consider it real? persistence: 2 } };

// Uses one of the momentum indicators but adjusts the thresholds when PPO is bullish or bearish // Uses settings from the ppo and momentum indicator config block config.varPPO = { momentum: 'TSI', // RSI, TSI or UO thresholds: { // new threshold is default threshold + PPOhist * PPOweight weightLow: 120, weightHigh: -120, // How many candle intervals should a trend persist // before we consider it real? persistence: 0 } };

// RSI settings: config.RSI = { interval: 14, thresholds: { low: 26, high: 60, // How many candle intervals should a trend persist // before we consider it real? persistence: 1 } };

// TSI settings: config.TSI = { short: 13, long: 25, thresholds: { low: -25, high: 25, // How many candle intervals should a trend persist // before we consider it real? persistence: 1 } };

// Ultimate Oscillator Settings config.UO = { first: {weight: 4, period: 7}, second: {weight: 2, period: 14}, third: {weight: 1, period: 28}, thresholds: { low: 30, high: 70, // How many candle intervals should a trend persist // before we consider it real? persistence: 1 } };

// CCI Settings config.CCI = { constant: 0.015, // constant multiplier. 0.015 gets to around 70% fit history: 90, // history size, make same or smaller than history thresholds: { up: 100, // fixed values for overbuy upward trajectory down: -100, // fixed value for downward trajectory persistence: 0 // filter spikes by adding extra filters candles } };

// StochRSI settings config.StochRSI = { interval: 3, thresholds: { low: 20, high: 80, // How many candle intervals should a trend persist // before we consider it real? persistence: 3 } };

// custom settings: config.custom = { my_custom_setting: 10, }

config['talib-macd'] = { parameters: { optInFastPeriod: 10, optInSlowPeriod: 21, optInSignalPeriod: 9 }, thresholds: { down: -0.025, up: 0.025, } }

config['debug-advice'] = { wait: 1, advice: 'long' }

// ~~~~~~~~~~~~~~~~ // CONFIGURING PLUGINS // ~~~~~~~~~~~~~~~~

// Want Gekko to perform real trades on buy or sell advice? // Enabling this will activate trades for the market being // watched by config.watch. config.trader = { enabled: true, key: 'blah', secret: 'blah', }

config.adviceLogger = { enabled: true, muteSoft: true // disable advice printout if it's soft }

// do you want Gekko to calculate the profit of its own advice? config.profitSimulator = { enabled: true, // report the profit in the currency or the asset? reportInCurrency: true, // start balance, on what the current balance is compared with simulationBalance: { // these are in the unit types configured in the watcher. asset: 1, currency: 100, }, // how much fee in % does each trade cost? fee: 0.25, // how much slippage/spread should Gekko assume per trade? slippage: 0.05 } config.pushover = { enabled: false, sendPushoverOnStart: false, muteSoft: true, // disable advice printout if it's soft tag: '[GEKKO]', key: '', user: '' }

// want Gekko to send a mail on buy or sell advice? config.mailer = { enabled: false, // Send Emails if true, false to turn off sendMailOnStart: true, // Send 'Gekko starting' message if true, not if false

email: '', // Your Gmail address muteSoft: true, // disable advice printout if it's soft

// You don't have to set your password here, if you leave it blank we will ask it // when Gekko's starts. // // NOTE: Gekko is an open source project < https://github.com/askmike/gekko >, // make sure you looked at the code or trust the maintainer of this bot when you // fill in your email and password. // // WARNING: If you have NOT downloaded Gekko from the github page above we CANNOT // guarantuee that your email address & password are safe!

password: '', // Your Gmail Password - if not supplied Gekko will prompt on startup.

tag: '[GEKKO] ', // Prefix all email subject lines with this

        //       ADVANCED MAIL SETTINGS
        // you can leave those as is if you
        // just want to use Gmail

server: 'smtp.gmail.com', // The name of YOUR outbound (SMTP) mail server. smtpauth: true, // Does SMTP server require authentication (true for Gmail) // The following 3 values default to the Email (above) if left blank user: '', // Your Email server user name - usually your full Email address 'me@mydomain.com' from: '', // 'me@mydomain.com' to: '', // 'me@somedomain.com, me@someotherdomain.com' ssl: true, // Use SSL (true for Gmail) port: '', // Set if you don't want to use the default port }

config.pushbullet = { // sends pushbullets if true enabled: false, // Send 'Gekko starting' message if true sendMessageOnStart: true, // disable advice printout if it's soft muteSoft: true, // your pushbullet API key key: 'xxx', // your email, change it unless you are Azor Ahai email: 'jon_snow@westeros.org', // will make Gekko messages start mit [GEKKO] tag: '[GEKKO]' };

config.ircbot = { enabled: false, emitUpdats: false, channel: '#your-channel', server: 'irc.freenode.net', botName: 'gekkobot' }

config.xmppbot = { enabled: false, emitUpdats: false, client_id: 'jabber_id', client_pwd: 'jabber_pw', client_host: 'jabber_server', client_port: 5222, status_msg: 'I\'m online', receiver: 'jabber_id_for_updates' }

config.campfire = { enabled: false, emitUpdates: false, nickname: 'Gordon', roomId: null, apiKey: '', account: '' }

config.redisBeacon = { enabled: false, port: 6379, // redis default host: '127.0.0.1', // localhost // On default Gekko broadcasts // events in the channel with // the name of the event, set // an optional prefix to the // channel name. channelPrefix: '', broadcast: [ 'candle' ] }

config.candleWriter = { adapter: 'sqlite', enabled: true }

// ~~~~~~~~~~~~~~~~ // CONFIGURING ADAPTER // ~~~~~~~~~~~~~~~~

config.adapters = { sqlite: { path: 'plugins/sqlite',

dataDirectory: './history',
version: 0.1,

dependencies: [{
  module: 'sqlite3',
  version: '3.1.4'
}]

}, // Postgres adapter example config (please note: requires postgres >= 9.5): postgresql: { path: 'plugins/postgresql', version: 0.1, connectionString: 'postgres://user:pass@localhost:5432', // if default port dependencies: [{ module: 'pg', version: '6.1.0' }] } }

// ~~~~~~~~~~~~~~~~ // CONFIGURING BACKTESTING // ~~~~~~~~~~~~~~~~

// Note that these settings are only used in backtesting mode, see here: // @link: https://github.com/askmike/gekko/blob/stable/docs/Backtesting.md

config.backtest = { adapter: 'sqlite', daterange: 'scan', batchSize: 50 }

// ~~~~~~~~~~~~~~~~ // CONFIGURING IMPORTING // ~~~~~~~~~~~~~~~~

config.importer = { daterange: { // NOTE: these dates are in UTC from: "2017-2-1 12:00:00" } }

// set this to true if you understand that Gekko will // invest according to how you configured the indicators. // None of the advice in the output is Gekko telling you // to take a certain position. Instead it is the result // of running the indicators you configured automatically. // // In other words: Gekko automates your trading strategies, // it doesn't advice on itself, only set to true if you truly // understand this. // // Not sure? Read this first: https://github.com/askmike/gekko/issues/201 config['I understand that Gekko only automates MY OWN trading strategies'] = true;

module.exports = config;

DrBlackross commented 7 years ago

Thats the config.... swapped out the gdax, put the keys in, adjusted the RSI, and date range

DrBlackross commented 7 years ago

no clue?