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 - jroddingham

Pages: [1]
1
I was using those to show a direction. When supergun algo in Gunbot asks for a price, and it was lower than last price, that's 1 negative direction. If the new price is higher, that's 1 positive direction. The +++---++++ was just representing a history of direction changes visually. You can also get something like that in the console using debug.

2
Couple of things I figured I would get typed out.

So, in my experience I have seen that supergun (the algo watchdog, not the RR strategy) works pretty darn well when monitoring directions. However, I have also noticed that it sometimes feels a little trigger happy (PUNS FOR DAYS) when performing a sell or buy. We know that it's monitoring for ++++++- to know when to sell and decide a trend reversal has happened. What we don't know is, exactly how many -'s it takes within a time period for that to happen. We can only configure the *total* number of prices it stores to determine directions. In my mind it would be desirable to make supergun more or less responsive to trend reversals. Meaning, sometimes it would be nice to allow a ++++-+--+++++++ to not sell, or be super sensitive and have it sell on ++++++-

Proposal:

     I propose a tight/loose trigger function for supergun directions. It would use two variables, 'triggerPlus' and 'triggerMinus'. These would be integers that define how many positive or negative directions in a row you would accept before a trigger condition is met.

For example, triggerPlus: 3 and triggerMinus: 2 with a MAX_DIRECTIONS: 10 would do the following:

trying to sell:

+++-++--++ -> Nothing happening to trigger yet, trend hasn't reversed because we are allowing for 2 negatives in a row so still rising
++++-++--- -> SELL! (3 negative directions has gone over the threshold, therefore trend has now reversed)

trying to buy:

----+----+ -> Nothing happening because not enough up trends to signal for a reversal
-----+-+++ -> BUY! You've gone over the configured amount to signal reversal

3
Beginners & Help / Re: Gunbot Configuration Guide (WIP)
« on: May 02, 2017, 08:49:06 PM »
guys, I am a little bit confused with EMA.
How do you calculate 0.02 and 0.04 ? Should I multiply 60 * 0,04 to get correct time ?
If yes 60*0,04 = 2,4 - it means 2 minutes ? Why it so small ?

Probably just due to the way the rest of the program is constructed. Instead of another line or two in the code to handle converting the config value to what the program needs, this is just a direct number. In this case, .02 == 2 hours, .04 == 4 hours. Just move the decimal point!
And now my head is blow off. how I'll set 15 mins ?

You sure you want 15/30 minute EMA calculations and not meaning to have 15 minute *candles*? I mean you can get 15 minutes by (.02 / 8) = .0025. I wouldn't suggest that, but hey tweak however you want!

4
Beginners & Help / Re: Gunbot Configuration Guide (WIP)
« on: May 02, 2017, 03:06:10 PM »
guys, I am a little bit confused with EMA.
How do you calculate 0.02 and 0.04 ? Should I multiply 60 * 0,04 to get correct time ?
If yes 60*0,04 = 2,4 - it means 2 minutes ? Why it so small ?

Probably just due to the way the rest of the program is constructed. Instead of another line or two in the code to handle converting the config value to what the program needs, this is just a direct number. In this case, .02 == 2 hours, .04 == 4 hours. Just move the decimal point!

5
Beginners & Help / Gunbot Configuration Guide (WIP)
« on: April 28, 2017, 01:25:37 PM »
This will take some time I think, so please disregard this post until the (WIP) is removed from the title. Thanks!

This post will be my attempt to get some visual documentation and explanations of the various strategies gunbot uses, as well as some more verbose descriptions of the config files. If ANYONE catches something said herein that is false, please reply and let me know. It takes a village and all that.... Let's get started!

I will attempt to keep this thing somewhat readable, there's a lot to cover, and much I don't know. This started with just wanting to make a verbose line for all the existing config comments, and has ballooned into something much more considering how often some questions get asked and assumptions of knowledge from existing users when trying to talk to newcomers. I had a decent amount of frustration getting details of the various parameters when I first joined up. Let's mitigate that a bit for future users.

Gunbot as of right now employs 4 different strategies.
  • BB - Bollinger Band
  • GAIN - Stepgain (explained later)
  • 1000 Trades - Ping Pong EMA
  • Supergun - Old Russian Roulette (confusing name, not to be confused with the supergun watchdog algo)

Bollinger Bands:

This is a well known indicator used in many other markets besides altcoins, of course. It is a method that attempts to visually represent the range of prices a security could hit on either extreme. It is calculated using standard deviation and SMA (simple moving average). It's a good way to visually see volatility in a security. (Gunbot likes volatility)

https://www.tradingview.com/wiki/Bollinger_Bands_(BB)


Now, actual strategies on using this particular indicator are beyond the scope of this document. However, let's make some basic assumptions so that the way it is configured with the bot and expected behaviors can be explained.

Let's assume you want to buy at the lower portion of the inside of the bands, and sell when a price climbs to the upper portion of inside the bands. The configuration file has these lines to set that:
Code: [Select]
LOW_BB: 10,
HIGH_BB: 10,
SELL_STRATEGY: 'BB',
BUY_STRATEGY: 'BB',



This is showing what your settings would then be trying to do. Please note that the overlays in that image are not to scale. We are dealing with percentages, so when the bands tighten up, so does the colored line I drew. This is more of a concept than an attempt to use hard numbers. The entire width of the inside of the bands will be 100%. The HIGH value measures as a % from the top of the band going down, and the LOW measures as a percentage on the inside going up. Also notice that gunbot uses a signed int for the integer variable, so will indeed accept a negative value. You can see the effect of that in the image, as it will start going negative as you leave the confines of the band.

OK, so you see how that works. For this to be effective though, you really need to have a lot of prices to calculate the deviations. The default of 300 prices is a suggestion, but of course you can go higher than this.

This next bit is fairly important for you to understand, as it relates to many other things gunbot does and the logic it follows.

When gunbot makes a call to the exchange, it is pulling whatever the newest price is at it existed on the books at that time. It logs this in memory and in the logs. How accurate this data is will be highly dependent on how often you are asking for the pricing data. It can and does collect data via PUSH notification via the public API, but this isn't enough.

Poloniex, Kraken, Bittrex, etc do not send any data as it relates to EMA, BB, etc. Meaning, it can't call and say "Give me the BB data for this pair, in this time frame, kthx." It is because of this fact that it has to collect the data itself in order to make it's own formula calculations.

Bot sleep delay really means "I will ask the exchange for a price every N seconds and wait that long before trying again."
Code: [Select]
MAX_LATEST_PRICES: 300 is where you would set how many prices you want the bot to store before switching to Bollinger Band trading. This is a sliding window, meaning it will ONLY be looking at the last N number of prices when making decisions.

It has a save state, to allow for a bot to restart and not have to collect a complete set of data again. Gunbot will perform best if you allow it to always be seeing a complete set of pricing data so as not to throw off your standard deviation numbers.

Code: [Select]
POLONIEX_VWA_1_INTERVAL: 0.02,
POLONIEX_VWA_2_INTERVAL: 0.04,
These are weighted variables, using EMA1 and EMA2, adjusted according to volume.

Poloniex can calculate the BB using all the available data on the books, and gunbot can only do it's best with the prices it has retrieved. This is why you CANNOT simply look at the Poloniex bands and see your bot didn't buy where you think it should have, because there will be a discrepancy there. The bands will change if you change the candles you are looking at, but not if you change the range of time.
You *need* to set the candlesticks on Poloniex (or other exchange) to match the PERIOD you have set in your configs to have any hope of comparison without creating your own charts from the bot log data!

This candle range will be set with
Code: [Select]
PERIOD: 15,   // candlestick period I believe that is the same across the configs, as far as the naming used there.

Ok, well let's see if I can manage to annotate the BB-XXX_YYY-config.js file with lots of comments, and let Gunthar tell me all the ways I'm wrong. Fun!

Code: [Select]
var config = {
DEFAULT_MARKET_NAME:'poloniex', // Self explanatory, I think he uses this in case some other parameter isn't passed, not sure though
DEFAULT_CURRENCY_PAIR:'BTC_PIVX', // ^^^^^ same

BTC_TRADING_LIMIT:0.01, // This is the maximum amount of currency that gunbot will be allowed to use to trade with. In the BB strategy, I believe this is all used in one trade.

SECURITY_MARGIN: 60,  // This is a percentage you set to tell the bot when you've raised the white flag and you are ready to surrender. If the price of the security you bought drops this number as a percentage from the price you bought, an immediate sell is issued.

MIN_VOLUME_TO_BUY: 0.0005, // This is pretty much if you don't like to see those small bags collecting in your portfolio. Set this to an amount that is the minimum you want to buy.

LOW_BB: 5, // Low end of the BB band, as a % measure up from the bottom band

HIGH_BB: 5, // High end of the BB band, as a % measure down from the top band

SELL_STRATEGY: 'BB', // You can mix and match strategies here, BB or GAIN

BUY_STRATEGY: 'BB', //  You can mix and match strategies here, BB or GAIN

BUY_LEVEL: 0.1, // this is the buy level used in GAIN, it's here in the BB because it will be used until enough prices have been collected to start BB

BITTREX_KEY: '', // API KEY
BITTREX_SECRET: '', // API SECRET

BITTREX_GAIN: 2, // This number is a percentage where gunbot will sell after the purchase

BITTREX_PRICE_METHOD: 'vWP', // yeah, no clue. This follows his variable naming, so some thing needed in relation to how the API data gets pulled differently from each exchange

BITTREX_VWA_1_INTERVAL: 10, // Time interval as Bittrex is concerned. I don't know, but I would assume this is close to the .02 from polo

BITTREX_VWA_2_INTERVAL: 120, // Time interval as Bittrex is concerned. I don't know, but I would assume this is close to the .02 from polo

KRAKEN_ASSET_PAIR: 'XETHXXBT',
KRAKEN_KEY: '',
KRAKEN_SECRET: '',
KRAKEN_GAIN: 2,
KRAKEN_PRICE_METHOD: 'vWP',
KRAKEN_VWA_1_INTERVAL: 1,
KRAKEN_VWA_2_INTERVAL: 15,

POLONIEX_KEY: '', // API KEY
POLONIEX_SECRET: '', API SECRET

GAIN: 2, // this is the buy level used in GAIN, it's here in the BB because it will be used until enough prices have been collected to start BB. It is also used in a situations where your best bet is to take the gain, due to what supergun is currently seeing.

POLONIEX_PRICE_METHOD: 'ohlc', // yeah, no clue. This follows his variable naming, so some thing needed in relation to how the API data gets pulled differently from each exchange

POLONIEX_VWA_1_INTERVAL: 0.02, // ema1 + volume period
POLONIEX_VWA_2_INTERVAL: 0.04, // ema2 + volume period

SELL_ON_START: false, // sell all your inventory when bot starts

CANCEL_SELL_ORDERS_ON_START: false, // cancel all your sell orders when bot starts

CANCEL_BUY_ORDERS_ON_START: true, // cancel all buys when bot starts

CANCEL_OPEN_ORDERS_ON_START: false, // cancel any open orders when bot starts

MAX_LATEST_PRICES: 300, // how many prices the bot will store to do the deviation calculations (this should be a nice high number for BB)

MAX_LATEST_DIRECTIONS: 30, // number of prices bot will use to determine price momentum up or down (supergun watchdog)

MAX_LAST_ORDERS: 500, // number to tell bot how many order entries to store in logs

PERIOD: 15, // candlestick period (If looking at Poloniex, make sure this matches your chart on the website)

SAVEFILE_SUFFIX: '-save.json', // pretty obvious, no need to change unless you're a tweaker. :)

API_CALLS_DELAY: 777, // new variable, not sure exactly what this does. Sounds like it should be obvious, but we are making calls for prices all the time. Maybe it has something to do with a specific API call. Gunthar?

BOT_SLEEP_DELAY: (1000) * 20, // used to determine the amount of time the bot should wait between calling the API and asking for orderbook prices.

BOT_MAX_LIFETIME: 999999999, // how long should this bot run before turning off?

BOT_ON_FAIL_DELAY: (1000) * 10, // If you get an error from Poloniex, due to any issue including them getting slow, this is a delay you set to override your normal delay. This is useful to not get banned!

ALERT_ON_NO_FUNDS: false,
SMTP_EMAIL: '%40@gmail.com',
ALERT_EMAIL: '********',
SMTP_PASSWORD: '**********',
SMTP: true,
SMTP_PROTOCOL: 'SMTPS',
SMTP_HOST: 'smtp.gmail.com',

DEBUG_LOG: false,
 I_REALLY_WANT_IT: false,
BUY_SMALL_PORTION: 1,
INSUFFICIENT_FUNDS_ON_SELL_FIX: 0.0005,
MAX_LATEST_PRICES_SHOWN: 0,
SHOW_LASTEST_DIRECTIONS: false,
MAX_LATEST_DIRECTIONS_SHOWN: 0,
LASTEST_DIRECTIONS_LIST_WIDTH: 0,
BTC_BALANCE: 2,
};
module.exports = config;

That's it for the BB section, I am surely wrong on some things, and missed others. I will be adding the next strategy soon, probably GAIN, as I haven't even run the 1000Trades or Russian Roulette yet!


6
That sir, is some sexy bash. Mine is just a line of commands. Yours is smart. I'm gonna go drink some Brawndo now. It's got electrolytes.

7
General Discussion / Re: Improvment suggestion to minimize bagholdings
« on: April 19, 2017, 01:04:47 AM »
This is a really welcomed addition to the bot, can't wait to check out the implementation.

8
Gunbot running in supergun, level 3. It picked the bottom and the top of the bounce perfectly. Just wanted to share with everyone and new users the power of direction analysis!


9
Beginners & Help / Re: [TUT] How to running GUNBOT in Linux
« on: April 14, 2017, 05:36:35 PM »
+1 for pm2 and a yaml config. I'll be using this instead of tmux I think.

10
There's only 1 EMA in that chart, and a BB. I have noticed this as well, it's not really a function of it being wrong, the bot does what it's told to do. The issue is the problem of what to set your window at. sometimes you as a human want to consider a very small frame of time, others you zoom out on a chart and you can see "whoa, this price spike is fake news."

Maybe could implement some type of extra 24 hour EMA 'sanity check' as others have suggested before going in on a buy. But yes, I have noticed quite a few instances of this happening, it's as you said due to the shortish window set.

11
Beginners & Help / Re: Linux tutorial
« on: April 14, 2017, 12:50:10 PM »
TMUX cheatsheet

https://gist.github.com/MohamedAlaa/2961058

You can enable mouse support too!
setw -g mode-mouse on

I had that link in the tutorial, didn't know about mouse support heh. Interesting.

12
Beginners & Help / Re: Linux tutorial
« on: April 13, 2017, 02:14:29 AM »
I am glad it helped. Was the currencies in the 2.0.3b version even? Is there a currencies.js in your folder?

13
Beginners & Help / GUNBOT - Linux Tutorial
« on: April 12, 2017, 02:00:37 PM »
I will assume you've got a working linux machine. VPS, local, whatever. There's already a ton of info on Google about getting that functional. (Gunthar if required we can maybe throw some links in here too, VPS suggestions etc)

OK. First thing you need to do is figure out which distribution you are using. Different versions have different package managers. It won't affect being able to run the gunbot executable. I will give instructions for Debian based distros, and we can append to it with package commands for the others if need be.
You now should be sitting in the home directory of your session.


Now you need to go grab the zip file containing the latest gunbot goodies. You do this by issuing a 'wget' command, which will copy that file to your home directory.
Open your browser and go to https://github.com/GuntharDeNiro/BTCT/releases
Find the latest one, right click the url and copy it to your clipboard. Go back to your terminal and issue a:

Code: [Select]
jrod@ISHTAR:~$ wget https://github.com/GuntharDeNiro/BTCT/releases/download/Beta2.0.4lin/gunbotv2.0.4_linux_x86_x64.zip

This will download the zip file to your home directory. (Gunthar doesn't use tar apparently  ;)) You now need to unzip it. You likely don't have unzip installed, so using the default Debian package manager you would issue this command:

Code: [Select]
jrod@ISHTAR:~$ sudo apt-get install unzip

You will be prompted for your password. Sudo is issued in this type of linux where you are a non-root user. You are telling the shell to run the command with elevated privileges. This is basically a security feature. After installing that package, you can now unzip your files.

Code: [Select]
jrod@ISHTAR:~$ unzip gunbotv2.0.4_linux_x86_x64.zip

OK, so you've gotten this far. the command 'ls' in linux will list the contents of the directory you're in. Let's do that now.

Code: [Select]
jrod@ISHTAR:~$ ls

You will see the original file you downloaded, and now a directory that contains everything that was unzipped. Now you need to get into that directory to do a couple more things. The command in linux to change a directory is 'cd' (It's also this in DOS and Windows terminal) You can go back a directory with a 'cd ..' and recall the list directory with 'ls'

Code: [Select]
jrod@ISHTAR:~$ cd gunbotv2.0.4_linux_x86_x64

Now, the gunbot file needs to be set to be executable, else you'll get an error about not having permissions to run it. So, let's do that!

Code: [Select]
jrod@ISHTAR:~/gunbot/gunbotv2.0.4_linux_x86_x64$ chmod +x gunbot

Now, to run the file from linux terminal it's the name of the file preceded by a './', like this:

Code: [Select]
jrod@ISHTAR:~/gunbot/gunbotv2.0.4_linux_x86_x64$ ./gunbot BTC_DASH
Gunthar has provided that one pair as an example, you will run gunbot executable against each pair you want to run. You will have to use a program called 'screen' or 'tmux' in order to run a session on a remote terminal, and not have it die when you disconnect.  I will give some brief instructions as well as some links on using tmux. Here's what it looks like when running:



So, tmux. Basically think of this as a container for all your multiple terminal sessions. There are many ways to do this, and Crypto Wally has by far the best implementation (which hopefully he posts at some point) but for now, this will get you something reasonably functional. First a simple google of 'tmux tutorials' will bring you lots of stuff. Videos are out there as well as detailed tutorials. I am going to show you how I currently look at my 14 or so pairs.

You're going to need to install tmux.

Code: [Select]
jrod@ISHTAR:~/gunbot/gunbotv2.0.4_linux_x86_x64$ sudo apt-get install tmux
Run tmux after installing:

Code: [Select]
jrod@ISHTAR:~/gunbot/gunbotv2.0.4_linux_x86_x64$ tmux

This will open up a new window, started in the directory you executed from. You will notice the new line at the bottom showing you the current active window. Tmux is the container in which everything else will nest in. Now, for tmux to know you're issuing a command to it, and not anything else you have to issue a (configurable) command to tell tmux to get ready and follow your godlike commands issued from your fingertips. By default, this is 'ctrl - b'. Here's a handy list of things you can do with tmux: https://gist.github.com/MohamedAlaa/2961058

You have your choice of running multiple full size windows that you can toggle between, or splitting the exiting window into smaller ones that you can see fill all at once. This is a matter of preference, but after a bunch of pairs due to the way the console outputs you can't really see much of what is going on at that point. That's why Wally pipes the output to tee and then reformats it. Anyway...

Here's how it looks if you issue a combination of 'ctrl-b %' commands and 'ctrl-b "' commands.

ctrl-b " splits the screen horizontally:


ctrl-b % splits the active window vertically:


You can move around the windows with a ctrl-b (arrow key), and kill any one of them with a ctrl-b x. Again, take a look at the commands list and play around.

Now, here's what I currently do for better visibility. Instead of a split screen, each command is opened in it's own full window and I can tab between those. You can see by default it's named 'bash' at the bottom, but that's because we haven't done anything. If you run a gunbot session, it will want to be named gunbot. You will want to rename these. You can rename your window with a 'ctrl-b ,' command. The bar at the bottom changes asking you for a new name, like this:



you can create a new window and rename it with a 'ctrl-b c' to (c)reate the new window and again a 'ctrl-b ,' command to rename it. There's two ways to toggle between the windows within tmux. You can do a 'ctrl-b' followed by the number of the window you're going for, or a 'ctrl-b w' which will bring you an interactive list to switch around.

OK, NOW DON'T FORGET THIS PART!!!

when you are ready to detach from your session, you will want to issue a 'ctrl-b d' for (d)etaching from your session. This will drop you back to your regular shell prompt, you can safely exit your shell/session. When you want to reattach, just issue a simple 'tmux attach' to get back to it. That works easily enough for the single tmux session, if you want to run multiple sessions that's another story.

Next up, you may want to play with the 1000 trades or best currencies. You will need to have the latest version of node installed.

check the version of nodejs you have by running:

Code: [Select]
jrod@ISHTAR:~$ nodejs --version

You don't want version 4.2.6, you'll likely need to update. Easiest cleaner way will be to purge your old version, and then curl to install the newer package.

Code: [Select]
jrod@ISHTAR:~$ sudo apt-get purge nodejs-legacy



Now, curl to get the newer version and prepare to install.

Code: [Select]
jrod@ISHTAR:~$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

Now, go ahead and intstall nodejs.

Code: [Select]
jrod@ISHTAR:~$ sudo apt-get install nodejs

At this point you can run the 1000 Trades and the Best Currencies apps from within your working folder.



Also, check this thread: https://gunthy.org/index.php?topic=74.0

It has a very nice way to run all your pairs at once without any fancy screen bash scripts. Well worth the look!

Gunthar already fattened my BTC wallet, but if you're feeling generous and this helped you out, here's my cardboard sign and tip jar wallet:

1ASxHgXRmubH5Mg9Wc4sG5HtcNwSL5kWeD

14
PROJECT CAPITAL STOP


I am thinking about this today in the chat, figured I would post it up. I am noticing most of my bagholding occurs when a purchase is made, and price simply never makes it to level 2, on a sell level 3. In this case, the bot decides to hold and wait. when you're the 'maker' you will incur the .15% fee. I would say that if the price rises above .15% after purchase, it sets a flag that enables the stop loss sell. It will be allowed to rise and see if it can get to between 2 and 3, but if it doesn't, and falls to levels approaching the original buy level, it should simply sell and preserve the capital to survive for the next buying opportunity. Sometimes you just end up on a long downtrend and would be better off where you started to have BTC ready to point to another pair.

That would be where the multiple buys along a curve would come in. You could have it detect that you've gone below your original buy level, (and EMA) and have a configurable way to buy more on the way down while supergun is watching the pricing trend.

my .02



Pages: [1]