Username: Password:

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - densmirnov

Pages: [1]
1
General Discussion / Re: Gunbot v11 - The way I run it.
« on: August 29, 2019, 10:32:37 PM »
Whoa! A bit of offtopic message, but I just want to express my amazement when I saw current progress on the bot. Been using it early days when it all stated from bitcointalk topic and small shell app (I've even developed gui for it back then). After it I was away for a bit more than a year from a trading world and now it is an amazing piece of software! Huge progress! Time to catch up and learn all the new features! Please keep up such a beautiful work!

2
gmon update
Version 0.0.31

.snip

Amazing! Works like charm! Thanks a lot!

3
Hi! As you might know, PM2 is one of the best process managers for *nix right now. And it works perfectly with GunBot, but when you have multiple configs the process of starting new instance becames a bit complicated.

I've tried to make a simple solution, which allows you to start new GunBot instance (as long as you have PM2 installed and there is a config file present) with just a simple command (run it from gunbot folder): gunstart BTC_LSK poloniex !

This command will work exactly as this one: pm2 start -n BTC_LSK -o /home/gunbot/gunbot3/poloniex-BTC_LSK-log.txt -e /home/gunbot/gunbot3/poloniex-BTC_LSK-err.txt /home/gunbot/gunbot3/gunthy-linuxx64 -- BTC_LSK poloniex, which will start a new pm2 instance with config and error logs in correct places and will use correct gunbot version for your system architecture.

To install this command simply run curl -o- https://densmirnov.com/gunstart.sh | bash and voila — you will be able to use gunstart command. Actually all this is just a simple script, which adds new function to your ~/.bash_aliases


P.S. Keep in mind, that this is very early release, possible full of bugs and glitches. Use it on your risk! But feel free to fix or change anything!

4
   Hi!

   I love Gunbot! And I just can't stop thinking about a feature, which (as it seems to me) might significantly improve the trading speed (especially in high volatility) and reduce unwanted delays!

   Basically, I suggest to change the bot behavior in a way so that instead of creating a single buy order, it would create several orders on different price levels. The first one will executed immediately after creation and the others will work as insurance in case of sudden price drop!

   The order sizes and price levels will calculated based on the Martingale strategy, so every next one wil be bigger than previous, so the break-even price of the asset will be even lower and lower with each buy. And even after a huge dump, we won't have to wait ages until the price recovers, just a small growth will be enough to continue making a profit! The number of orders to create, step between orders, martingale factor for new orders and the amount of deposit used for order creation can be set individually in each config file (by setting some new variables):

   Perhaps, it will be possible to calculate the indent between the orders, as well as the Martingale coefficient fully dinamically, depending on the momentum of the price change and current 'p(d)umping speed'.


   Possible example of new variables section in config file:

//  -----------------------------------------------
//  MULTIPLE ORDER CREATION. MARTINGALE STRATEGY
//  -----------------------------------------------
    ORDERS_COUNT:   5,             // Number of additional new orders to create;
    ORDERS_INDENT5,             // Distance between the newly created orders;
    MARTINGALE:     1,             // Martingale factor for dynamic order size calculation;
    TRADING_LIMIT1,             // Maximum percent of initial balance to use for each pair.

5
Thanks for excellent addition! I have also reworked config template a bit with much clearer formatting and more easy-to-read comments. Feel free to use this version as well. To download simply click on image or follow this link.

P.S. It would be cool if we can provide additional config file with only static exchange-related options. And pair config will became smaller, with only neccessary trade-related options.



Code: (json) [Select]
var config = {

    //  -----------------------------------------------
    //  STARTUP OPTIONS
    //  -----------------------------------------------
        SELL_ON_START: false,
        CANCEL_SELL_ORDERS_ON_START: false,
        CANCEL_BUY_ORDERS_ON_START: false,
        CANCEL_OPEN_ORDERS_ON_START: false,

        MAX_LATEST_PRICES: 600,             // Limit of latest prices to analyze to determine if price is growing or falling;
        MAX_LATEST_PRICES_TREND: 60,        // 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;
        MAX_LAST_ORDERS: 10,                // Keeping last orders bought;
        PERIOD: 15,                         // Candlestick period.

        SAVEFILE_SUFFIX: '-save.json',

    //  -----------------------------------------------
    //  PRIMARY SETTINGS
    //  -----------------------------------------------
        DEFAULT_MARKET_NAME: "poloniex",
        DEFAULT_CURRENCY_PAIR: "BTC_LSK",   // Single pair format for all markets!
        BUYLVL1: 3,                         // Buy when the price drops by this percentual or lower if BUYLVL is 1;
        BUYLVL2: 12,                        // Buy when the price drops by this percentual or lower if BUYLVL is 2;
        SELLLVL1: 2,                        // Sell when the price drops by this percentual or higher is SELLLVL is 1;
        SELLLVL2: 80,                       // Sell when the price drops by this percentual or higher is SELLLVL is 2;
        BUYLVL: 2,                          // Possible values 1 and 2 (if you want to buy at level 1 or level 2);
        SELLLVL: 2,                         // Possible values 1 and 2 (if you want to sell at level 1 or level 2);
        BUY_STRATEGY: "BB",                 // Accepted values BB or STEPGAIN or GAIN or PINGPONG;
        SELL_STRATEGY: "BB",                // Accepted values BB or STEPGAIN or GAIN or PINGPONG;
        LOW_BB: 30,                         // Buy when the price is higher than low BB by this percentual;
        HIGH_BB: 30,                        // Sell when the price is lower than high BB by this percentual;
        PINGPONG_BUY: 0.001,                // Price to buy (or lower) in the ping pong strategy;
        PINGPONG_SELL: 0.002,               // Price to sell (or higher) in the ping pong strategy;
        BUY_LEVEL: 2,                       // If GAIN buy strategy is used, buy at this percentual below lower EMA value;
        GAIN: 2,                            // If GAIN sell strategy is used, sell at this percentual above bought price;
        BTC_TRADING_LIMIT: 0.15,            // Max amount of BTC balance to use for each pair;
        SECURITY_MARGIN: 80,                // Sell all balance if currency decreases XX% after you bought it.

    //  -----------------------------------------------
    //  BITTREX
    //  -----------------------------------------------
        BITTREX_KEY: '',
        BITTREX_SECRET: '',

        BITTREX_PRICE_METHOD: 'ohlc',       // OHLC OR VWA "Price to Buy" definition method;
        BITTREX_VWA_1_INTERVAL: 10,         // Weighted Average Interval in minutes;
        BITTREX_VWA_2_INTERVAL: 120,        // Weighted Average Interval in minutes;

        MIN_VOLUME_TO_BUY: 0.0005,          // Bitrex MIN volume.

    //  -----------------------------------------------
    //  KRAKEN
    //  -----------------------------------------------
        KRAKEN_ASSET_PAIR: 'XETHXXBT',

        KRAKEN_KEY: '',
        KRAKEN_SECRET: '',

        KRAKEN_PRICE_METHOD: 'vwa',         // OHLC OR VWA "Price to Buy" definition method;
        KRAKEN_VWA_1_INTERVAL: 1,           // Weighted Average Interval in minutes;
        KRAKEN_VWA_2_INTERVAL: 15,          // Weighted Average Interval in minutes.

    //  -----------------------------------------------
    //  POLONIEX
    //  -----------------------------------------------
        POLONIEX_KEY: '',
        POLONIEX_SECRET: '',

        POLONIEX_PRICE_METHOD: 'vwa',       // OHLC OR VWA "Price to Buy" definition method;
        POLONIEX_VWA_1_INTERVAL: 0.02,      // Weighted Average Interval in hours;
        POLONIEX_VWA_2_INTERVAL: 0.04,      // Weighted Average Interval in hours.

    //  -----------------------------------------------
    //  BOT TIMINGS
    //  -----------------------------------------------
        API_CALLS_DELAY: 777,
        BOT_SLEEP_DELAY: (1000)*60,         // Bot cycle delay (Coef * Sec);
        BOT_MAX_LIFETIME: 999999999,        // Overall bot lifetime (Coef * Min);
        BOT_ON_FAIL_DELAY: (1000)*30,       // Bot repeat cycle delay if previous cycle failed (Coef * Sec).

    //  -----------------------------------------------
    //  EMAIL
    //  -----------------------------------------------
        ALERT_ON_NO_FUNDS: false,           // Send E-mail on insufficient funds.
        SMTP_EMAIL: '%40@gmail.com',
        ALERT_EMAIL: '********',
        SMTP_PASSWORD: '**********',
        SMTP: false,
        SMTP_PROTOCOL: 'SMTPS',
        SMTP_HOST: 'smtp.gmail.com',

    //  -----------------------------------------------
    //  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: 5,                     // BTC balance for test purposes.

    //  -----------------------------------------------
    //  DEBUG
    //  -----------------------------------------------
        DEBUG_LOG: true,
        I_REALLY_WANT_IT: false,
        BUY_SMALL_PORTION: 1,
        INSUFFICIENT_FUNDS_ON_SELL_FIX: 0.0005,
        INSUFFICIENT_FUNDS_ON_BUY_FIX: 0.0005
};

module.exports = config;

Pages: [1]