Update Pre-Release v.2.0.1b (Linux x86/x64)
Changelogs:
Fix error handling for sockets hang up: doesnt matter how much and how long Poloniex gets ddos'd, we use different ports at each call
Fix missing update of Price to Buy
Fix double buy orders if sell order is not correctly placed on book
Implementing log.txt, err,txt and cleaning up console from all my debug messages
Implementing dynamic speed of the bot: we need to be fast to sell, before the price goes down after a pump
Implementng a retry speed when requests to poloniex fail a callback
Implemented cycle restart when a call fails: this would prevent sockets hang up
Introducing volume as a third indicator: we now use weighted average supporting EMA1 and EMA1
Fix missed sell orders: sockets hang up prevented to fetch altcoin balance
Code clean up
This version is pretty close to the final release and it has been tested in the worse condition of a Poloniex mitigated ddos attack. A special thanks to all that bugged me in the past days: keep reporting and dont worry if you dont see my answer, you will see it in this code.
How to start the bot:
1.- Create a clone of the BTC_XXX-config.js file included in the repo, for each pair you want to start.
2.- Run ./gunbot BTC_XXX
Please check the BTC_XXX-config.js, many changes on it:
var config = {
//-----------------------------------------------
// PRIMARY SETTINGS
//-----------------------------------------------
KEY: '',
SECRET: '',
GAIN: 1.5, // margin to sell when currency increases its value (example: sell when currency increases 2.5% of paid value)
BTC_TRADING_LIMIT: 0.01,// max amount of BTC balance to use for each pair
SECURITY_MARGIN: 60, // sell all balance if currency decreases x% after you bought it
SELL_ON_START:false,
CANCEL_SELL_ORDERS_ON_START:false,
MAX_LATEST_PRICES: 30,// limit of latest prices to analyze to determine if price is growing or falling
MAX_LATEST_DIRECTIONS:30,// limit of latest price directions ,used in supergun detection
STARTEMA1: 0.02,// weighted average interval in hours
STARTEMA2: 0.04,// weighted average interval in hours
PERIOD: 15, // candlestick period
SAVEFILE_SUFFIX: '-save.json',
//-----------------------------------------------
// BOT TIMINGS
//-----------------------------------------------
BOT_SLEEP_DELAY:(1000)*13,// bot cycle delay (koef*sec)
BOT_MAX_LIFETIME:999999999,// overall bot lifetime(koef*min),
BOT_ON_FAIL_DELAY:(1000)*3, // bot repeat cycle delay if previous cycle failed (koef*sec)
//-----------------------------------------------
// EMAIL
//-----------------------------------------------
ALERT_ON_NO_FUNDS:false, // email on insufficcient funds
SMTP_EMAIL: '%
[email protected]',
ALERT_EMAIL:'********',
SMTP_PASSWORD: '**********',
SMTP: true,
SMTP_PROTOCOL: 'SMTPS',
SMTP_HOST: 'smtp.gmail.com',
//-----------------------------------------------
// DEBUG
//-----------------------------------------------
DEBUG_LOG:false,
I_REALLY_WANT_IT:true,// debug hardcode hack
BUY_SMALL_PORTION:1,// debug volume limiter,must be 1 > x > 0
//-----------------------------------------------
// OUTPUT
//-----------------------------------------------
MAX_LATEST_PRICES_SHOWN: 0, // limit of latest prices to show in console.log
SHOW_LASTEST_DIRECTIONS:false, // show chart in console
MAX_LATEST_DIRECTIONS_SHOWN:0, // chart height
LASTEST_DIRECTIONS_LIST_WIDTH:0, // chart width
//-----------------------------------------------
// OTHER (might be deprecated/not in use)
//-----------------------------------------------
BTC_BALANCE: 2// btc balance for test purposes,
};
module.exports = config;
Please report any bug immediately!!!
Thanks!
~Gun