Username: Password:

Author Topic: Release Candidate v3.3.3 - Poloniex/Bittrex - All OS - Code name: "Autopilot"  (Read 46051 times)

Offline Gunthar

  • Administrator
  • *****
  • Posts: 287
    • View Profile
Release Candidate v3.3.3 - Poloniex/Bittrex - All OS - Code name: "Autopilot"
@GuntharDeNiro GuntharDeNiro released this 11 minutes ago

This is a major release introducing new concepts both in core and strategies. Starting by this release, Gunbot devs family is now bigger: @raffaeledonadono is now caring about the "core-engine" while i am focused on the "strategies" part of the code. This new devs structure will allow us to stay focused on the different parts of the code while double checking each other code with doubled security and coding accuracy.
Please: continue to forward all support requests to me, tho, thank you.

The final release will aim to:

Make Gunbot able to run as many pairs and as many exchanges as you want in one single process using a very low amount of RAM and CPU
Solve all past reported bugs
Give new Technical Analysis instruments for an advanced trading experience
Give a real cross-platform package including GUI for *nix/OSX/arm
Give Gunbot real-data from exchanges with no limit to "bot timing"
Give 3rd parties devs a Websocket API to build plugins
Give Gunbot capability to work as a live data-hub for 3rd parties software
Give end-users capability to build their own strategies based on TA indicators
This Release Candidate aims to:

Give existing customers a tool to liquidate their altcoin holdings with profit and give new liquidity to their Gunbot to continue trading at new price levels (healing from recent cripto-crashes)
Give a preview and receive feedbacks for a community-driven final release
This Release Candidate is able to:

Run all your pairs in one single console for Poloniex and Bittrex exchanges
Average down your "bought price" from existing "bags" and sell them at profit in 24/48 hours
Continue to trade all your pairs without creating "bags" or liquidating them at lower levels (with profit) if the value of the altcoin dropped below the bought price.
Fetching real data from Poloniex and Bittrex exchanges: you can now see the same values than exchanges for indicators (BB, EMA, etc). If Gunbot restarts, the indicators data will NOT be lost.
Trade all your pairs with a real and effective BB and GAIN strategy (SG and other strategies to be completed in a patch)
Deprecate bot timing: we are now "live" on the exchange and we run following microseconds tickers updates from exchanges
Fix all bugs reported in v3.3.2: double buys, wrong indicators, wrong priceToBuy/priceToSell calculations
included all 422 errors, stuck instances etc
Added TA indicators capability
Added "watch mode only" and "panic sell" mode: first mode would run gunbot without trading, second one would sell all altcoin at actual market price (WARNING: it might be at loss).
How to run v3.3.3 from existing v3.x

Disclaimer: v3.3.3 is backward compatible with any existing trades/balances. - v3.3.3 config files are NOT backward compatible
Step-by-Step instructions:
The concept: one of the main issues of Gunbot old versions, was to be unable to follow the price flow during up and down levels swings. If BB and EMA moved to new low levels and you bought during the previous price level timeframe, you would end with the unfamous "bags" in your portfolio. Despite we all "luv" bags because they represent cheap coins we were able to buy, if market conditions keep being bearish, "bags" would engulf our portfolio with unsold coins, hence missed trades because of low primary coin liquidity. The v3.3.3 "Autopilot" version, solves this issue with a simple wise move: averaging down your bought price and selling all "bags" at a profit in a short-term time frame, giving so new liquidity to your Gunbot and making it able to continue its profitable strategy on the new market level.
How it works: the leading indicators are still BB. Now we use live data from exchange so we can trick BB at a reliable value, same than exchanges. I tested this strategy with SMA: it triggers the average-buy order TOO EARLY, do not use SMA for this strategy!!
See the following scenario:
Your last buy order for coin X was at 0.001;
HighBB was at 0.0014;
Bear come in the scene and price drops to 0.00083 and now HighBB is at 0.00094;
Because HighBB value (0.00094) dropped below your last bought price (0.001), Gunbot buys again SAME AMOUNT OF COIN X
We have now a new "bought price" at (0.001+0.00083)/2=0.00091 with an HighBB at 0.00094: WE CAN SELL AT PROFIT VERY SOON!!!
What you need to do to autostart this on your existing bags?
The Release Candidate is already configured to start this automatically on your existing bags. The only thing you need to configure are pairs you want to run on this. Let's see some config file format:
We are still without GUI so you will need to understand how the config file is structured: it is a json file
Sections in the config.js file need their synthax:
Exchanges/Pair section
"pairs": {
"poloniex": {
"BTC_XMR": {
"strategy": "bb",
"override": {}
},
"BTC_ETH": {
"strategy": "bb",
"override": {}
},
"BTC_ETC": {
"strategy": "bb",
"override": {}
}
},

  "bittrex": {
     "BTC-LTC": {
        "strategy": "bb",
        "override": {}
     },
                 "BTC-PIVX": {
        "strategy": "bb",
        "override": {}
     }
  }
},
As you can see it is a simple json file but we need to respect commas, quotes and parenthesis format inside it. The tree is like this:

PAIR SECTION > EXCHANGE > PAIR LIST
If you have any doubt you can contact me for assistance about the right synthax to use or you can open config.js file with Notepad++ using its embedded code highlight feature.

Strategies section
The strategy section is preconfigured to start averaging down when it is needed and sell pretty much immediately with 0.6% of profit: if follows BB in buy (unless TRAILING STOP enters the scene) and then sells at 0.6% with GAIN (notice the highBB setting is at 60 to not override GAIN). Start like this to get rid of your bags and let it run for 1 or 2 days. You will see your bot coming back to life on your poloniex/bittrex trading history (and balance). When you are satisfied of your bags recovering, switch highBB setting at 40 or below at desired levels: you will meet a new GUNBOT: emotionless, continuosly profitable, despite the coins swings.
Example of strategy to get rid of bags

"strategies": {
"bb": {
"PERIOD": 15,
"BUY_LEVEL": 0.1,
"GAIN": 0.6,
"HIGH_BB": 60,
"LOW_BB": 40,
"PANIC_SELL": false
}
Change to this configuration once you got rid of your bags

"strategies": {
"bb": {
"PERIOD": 15,
"BUY_LEVEL": 0.1,
"GAIN": 0.6,
"HIGH_BB": 40,
"LOW_BB": 40,
"PANIC_SELL": false
}
Disclaimer: you need capital to average down. Rather you are able to deposit more bitcoin at your exchange account or you need some immediate liquidity from existing bags. How much capital or how much liquidity you need to start using this strategy? Same amount in BTC (or primary coin) of one of your bags: say you have a list of 10 bags > deposit BTC (or primary coin) amount equal to ONE OF YOUR BAGS HOLDING VALUE IN BTC (i.e. if one of your bags is ETH and its value in BTC is 0.02BTC: deposit 0.02BTC), or sell one of your bags (any of your choice) at market price so to give your account an immediate liquidity, if you are unable to deposit more BTC (or primary coin). You dont need to deposit a lot of BTC (or primary coin) to average down your bags: it is enough to cover just one bag only and your GUNBOT will start a chain of bags-recovering, getting liquidity as it sells your bags. Keep this in mind by now on when you use GUNBOT: dont use all your capital, GUNBOT will need a reserve in case averaging down is needed because market conditions.

How to start GUNBOT
Windows: compile the config.js file and double click on gunthy.exe
Linux/MacOs: compile config.js file and run ./gunthy
I'm pretty sure a lot of questions will come out and i'm looking forward to all of you bugging me 24/7 on forums and Telegram...but this is why we love GUNBOT!

Please report any bag immediately!!! ;)
Thanks!
~Gun

Offline agis

  • Rookie
  • *
  • Posts: 16
    • View Profile
You just made me smile  :)
Thanks!

Offline iuhrge8w5

  • Rookie
  • *
  • Posts: 16
    • View Profile
how to compile the config.js file on windows?
Double click shows error,
line 2
char 9
missing ';'

Double click gunthy.exe shows error, fail to load config

Offline LenardBang

  • Rookie
  • *
  • Posts: 4
    • View Profile
edit it in notepad++ for example, set all pairs according to the examples on website, save, run gunthy

Offline lololo51

  • Rookie
  • *
  • Posts: 5
    • View Profile
Ok, eddited with notepad++, everything is ok in pairs .
Got unexpected token > at position 709 ..

Don't understand :(

Offline iuhrge8w5

  • Rookie
  • *
  • Posts: 16
    • View Profile
Ok, eddited with notepad++, everything is ok in pairs .
Got unexpected token > at position 709 ..

Don't understand :(
same here. not sure if also at position 709 though. a lot bugs

Offline LoTeK

  • Rookie
  • *
  • Posts: 2
    • View Profile
I keep getting the same red error scrolling by...


Processing strategy BB for BTC-LTC on bittrex
Error on strategy BB for BTC-LTC on bittrex while getting ema1 -\ Error: Cannot read property 'sma' of undefined
Processed pair BTC-LTC with delay 687 ms
Got trading signal from BTC-MTL on bittrex with delay 432 ms at 2017/07/25 19:44:54
2017/07/25 19:44:54: Getting ask and bid prices from bittrex
2017/07/25 19:44:54: Getting balances from bittrex
2017/07/25 19:44:54: Checking open orders from bittrex
2017/07/25 19:44:55: Ledger state for BTC-MTL is: Ok!
2017/07/25 19:44:55: Getting prices from bittrex
2017/07/25 19:44:55: Last Bid price BTC-MTL: 0.00167 | Last Ask: 0.00167791
2017/07/25 19:44:55: Balance BTC: 45.00012
2017/07/25 19:44:55: Balance MTL: 0
2017/07/25 19:44:55: On Orders MTL: 0
Processing strategy BB for BTC-MTL on bittrex

Offline LoTeK

  • Rookie
  • *
  • Posts: 2
    • View Profile
I was also able to test this on windows with the same result for bittrex...

Error on strategy BB for BTC-LTC on bittrex while getting ema1 -\ Error: Cannot read property 'sma' of undefined

Offline iuhrge8w5

  • Rookie
  • *
  • Posts: 16
    • View Profile
What does  "compile the config.js" means?
I can't even get anything from google.

Anyway I edited the file as instructed. but a lot error when i click gunthy.exe  :-\

Offline agis

  • Rookie
  • *
  • Posts: 16
    • View Profile
Been running the new version for 9 hours, with the purpose of first get rid of my bags, and then re-start using it as expected.

Results/impressions so far:
1. Pretty fast
2. No errors
3. Very low CPU/Memory usage
4. Very aggressive, compared to what I was used to seeing... Now I see lots of Bought/Sold/Not enough BTC
5. Did not sell any of my bags yet, but I'm already making profit (some peanuts, due to my de-bagging settings) from other pairs

Feature request: An option in config.js to disable a pair, instead of having to remove the pair from the configuration file

All in all, great work!!!

Offline ajg

  • Rookie
  • *
  • Posts: 12
    • View Profile
This looks like a major release!  Wow!

But can someone post or attach a simple example config file with a few pairs in it so us noobs can figure out what it's supposed to look like (take out your keys of course).

Great job to the devs!!  Thank you!

Offline scarab2378

  • Rookie
  • *
  • Posts: 6
    • View Profile
Gunthar,
where in the config file do we set the position sizes for each pair?

Offline agis

  • Rookie
  • *
  • Posts: 16
    • View Profile
Are all the files of the previous releases needed, or can they be safely deleted?

I'm talking about all the
*-config.js
*-log.js
*-port.js
*-save.js
*-token.js
*-trades.js
*-worker.js

Offline agis

  • Rookie
  • *
  • Posts: 16
    • View Profile
This looks like a major release!  Wow!

But can someone post or attach a simple example config file with a few pairs in it so us noobs can figure out what it's supposed to look like (take out your keys of course).

Great job to the devs!!  Thank you!

Make sure you match opening and closing curly braces.
Every group of similar sections or fields is separated by a comma. The last one (section or field) does not have a comma after it...
The indentation helps you visually understand the grouping of sections and fields

{
  "pairs": {
    "poloniex": {
      "BTC_BTS": {
        "strategy": "bb",
        "override": {}
      },  // <-- comma after each similar section, i.e. what is enclosed in curly braces
      "BTC_XEM": {
        "strategy": "bb",
        "override": {}
      },  // <-- comma after each similar section, i.e. what is enclosed in curly braces
      "BTC_BURST": {
        "strategy": "bb",  // <-- comma btween fields
        "override": {}   // <-- NO comma as it is the last field before the closing curly brace
      }   // <-- NO comma after final secction
    }
  }
  "exchanges": {
    "poloniex": {
      "key": "ABC",
      "secret":"DEF"
    },
    "kraken": {
      "key": "",
      "secret":""
    }
  },
  "bot": {
    "period_storage_ticker": 300,
    "interval_ticker_update": 10000,
    "timeout_buy": 120,
    "timeout_sell": 60,
    "BTC_TRADING_LIMIT": 0.05,
    "MIN_VOLUME_TO_BUY": 0.005,
    "WATCH_MODE": false
  },
  "strategies": {
    "bb": {
      "PERIOD": 15,
      "BUY_LEVEL": 0.1,
      "GAIN": 0.6,
      "HIGH_BB": 60,
      "LOW_BB": 40,
      "PANIC_SELL": false
    }
  }
}

Offline iuhrge8w5

  • Rookie
  • *
  • Posts: 16
    • View Profile
This looks like a major release!  Wow!

But can someone post or attach a simple example config file with a few pairs in it so us noobs can figure out what it's supposed to look like (take out your keys of course).

Great job to the devs!!  Thank you!

Make sure you match opening and closing curly braces.
Every group of similar sections or fields is separated by a comma. The last one (section or field) does not have a comma after it...
The indentation helps you visually understand the grouping of sections and fields

{
  "pairs": {
    "poloniex": {
      "BTC_BTS": {
        "strategy": "bb",
        "override": {}
      },  // <-- comma after each similar section, i.e. what is enclosed in curly braces
      "BTC_XEM": {
        "strategy": "bb",
        "override": {}
      },  // <-- comma after each similar section, i.e. what is enclosed in curly braces
      "BTC_BURST": {
        "strategy": "bb",  // <-- comma btween fields
        "override": {}   // <-- NO comma as it is the last field before the closing curly brace
      }   // <-- NO comma after final secction
    }
  }
  "exchanges": {
    "poloniex": {
      "key": "ABC",
      "secret":"DEF"
    },
    "kraken": {
      "key": "",
      "secret":""
    }
  },
  "bot": {
    "period_storage_ticker": 300,
    "interval_ticker_update": 10000,
    "timeout_buy": 120,
    "timeout_sell": 60,
    "BTC_TRADING_LIMIT": 0.05,
    "MIN_VOLUME_TO_BUY": 0.005,
    "WATCH_MODE": false
  },
  "strategies": {
    "bb": {
      "PERIOD": 15,
      "BUY_LEVEL": 0.1,
      "GAIN": 0.6,
      "HIGH_BB": 60,
      "LOW_BB": 40,
      "PANIC_SELL": false
    }
  }
}

"strategies": {
"bb": {
"PERIOD": 15,
"BUY_LEVEL": 0.1,
"GAIN": 0.6,
"HIGH_BB": 40,
"LOW_BB": 40,
"PANIC_SELL": false
}

"GAIN": 0.6, meaning sell at gaining 0.6% ?
only 0.1% left after fee.

can i change this figure when doing normal trading (no bag)? or is that on purpose?

also now it's always the taker not maker of orders which means the fee is higher. how to change that?
« Last Edit: July 26, 2017, 12:37:46 PM by iuhrge8w5 »

Offline agis

  • Rookie
  • *
  • Posts: 16
    • View Profile
<snip />

can i change this figure when doing normal trading (no bag)? or is that on purpose?

also now it's always the taker not maker of orders which means the fee is higher. how to change that?

Gunthar has spent a lot of time explaining every setting, and he has also written (at least) one topic on how he runs the bot.
The answers to your questions are in there.

If you don't have the time to read, there are members of this forum that provide configuration services. See 'Services & Third Party plugins

Offline iuhrge8w5

  • Rookie
  • *
  • Posts: 16
    • View Profile
<snip />

can i change this figure when doing normal trading (no bag)? or is that on purpose?

also now it's always the taker not maker of orders which means the fee is higher. how to change that?

Gunthar has spent a lot of time explaining every setting, and he has also written (at least) one topic on how he runs the bot.
The answers to your questions are in there.

If you don't have the time to read, there are members of this forum that provide configuration services. See 'Services & Third Party plugins

i've read it and still have questions that's why i asked.
do you know the answers? and i assure you it's not there.
it seems it is you who didn't read and just assumed everything is well-explained.
well, it's not.

i appreciate Gunthar's effort of course and i always read and search before asking.

i don't know the point of you replying these common sense but thanks anyway.

also i just got answers from Gunthar so all good.

Offline bobjones34

  • Rookie
  • *
  • Posts: 11
    • View Profile
Cant find the download for the new version,what am i missing    ;)

Offline scarab2378

  • Rookie
  • *
  • Posts: 6
    • View Profile
Anyone else have a problem with this version running for a while then hanging?  I've had it happen twice since yesturday.  Left me with open positions with unrealized profits (losses).  I'm not sure if the bot accounts for these open positions when I restart it.  If anyone knows, please post here!

Offline stm256

  • Rookie
  • *
  • Posts: 2
    • View Profile
I noticed i ended up with running 3.3.4 which i started with bag scavenging about 9-10 hours ago. It should also be worth mentioning that back then i didn't have enough btc buffer to make double buys due to btc deposit confirmation in process.
Initially all pairs was processed (~7 on bittrex, 1 on poloniex) however at the moment it looks like only the pair at poloniex is processed.
How can i be sure everything is working?

Great work with the bag management though!
I am so impressed by the development of this product, keep up the good work.