Username: Password:

Author Topic: GUNBOT v5: Setting up your BB strategy to match CHARTS  (Read 70468 times)

Offline Culture

  • Rookie
  • *
  • Posts: 40
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #20 on: September 22, 2017, 07:22:51 PM »
It'll have to set how to report back here, using Sjakil's GUI makes it a different process...
« Last Edit: September 22, 2017, 10:03:20 PM by Culture »
If you find my discussion useful, buy me a drink: 17vaWPJeDN7YXfRu6TRrwUDY8ETTPtJuCu

Offline SvenB

  • Rookie
  • *
  • Posts: 9
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #21 on: September 22, 2017, 10:41:38 PM »
It'll have to set how to report back here, using Sjakil's GUI makes it a different process...

I'm using Sjakil's GUI too and I am looking for the settings in Gunbot so that Gunbot matches Sjakil's GUI and I can match it in Bittrex. When in Bittrex I add the BB's to the chart with a SMA period of 10 and a 5 minute candle stick the Bittrex chart matches Sjakil's GUI exactly (when I have Sjakil's GUI at 5 minute candle stick which I prefer). By reading a lot of posts I think I understand how to set it up, please do correct me if I'm wrong :)

Now to setup Gunbot (using version 5.0.4) to "see" exactly the same as Sjakil's GUI I think I need the following settings:

Bot settings:
      "period_storage_ticker": 2000,     (See calculation below)
      "interval_ticker_update": 15000,  (I prefer 15 second ticker update)

BB strategy settings:
         "PERIOD": 5,      (5 minute candle stick which I use in Sjakil's GUI and what I prefer)
         "STDV": 2,         (Default setting used by Sjakil's GUI and default setting in Bittrex)
         "SMAPERIOD": 200,    (See calculation below)

The calculation of the SMAPERIOD is: (10*5*60)/15 = 200
   10 is the SMA period Sjakil's GUI uses
   5 is the candle stick period which I prefer
   60 is minutes
   15 is the interval ticker divided by 1000

So to force Gunbot to use the 10 period SMA the SMAPERIOD setting must be 200

Because the 10 period SMA and 200 tickers per period the period_storage_ticker must be 2000


Hopefully someone can confirm this is the correct way to set Gunbot to match Sjakil's GUI ?


Offline Culture

  • Rookie
  • *
  • Posts: 40
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #22 on: September 22, 2017, 10:45:38 PM »
Hmmm
I'm not sure about period_storage_ticker, but to the rest, yes.

I need to look into the storage bit...
If you find my discussion useful, buy me a drink: 17vaWPJeDN7YXfRu6TRrwUDY8ETTPtJuCu

Offline robert1robert

  • Rookie
  • *
  • Posts: 4
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #23 on: September 24, 2017, 01:10:07 AM »
Hey Culture,
I'm on bittrex. BBands. Field: Close, Period: 20, StDev: 2, Moving Average: Exponential.
In gunbot, my bbstepgain config: interval_ticker_update: 15000, period: 5, smaperiod: 400

This is according to your formula: 20-period BB indicator * 5-min candles * 60-seconds / 15 = 400

But as I look at the output of gunbot compared to the Bittrex graphs, the values are "close" but still different. Thoughts?

Code: [Select]
2017/09/24 00:08:13: BTC-STRAT Last Bid/Ask 0.00110777/0.00111678
2017/09/24 00:08:14: Got Trading History
2017/09/24 00:08:14: Price to buy: 0.00110663
2017/09/24 00:08:15: Got Open Orders
2017/09/24 00:08:15: Last Bid/Price to sell: 0.00110777/0.00112336
2017/09/24 00:08:15: Last Ask/Price to buy: 0.00111678/0.00110663
------------------------------------------------------------------------------------------------
HIGH BB: 0.00112789 == SMA: 0.00111460 == LOW BB: 0.00110132

Offline Culture

  • Rookie
  • *
  • Posts: 40
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #24 on: September 24, 2017, 01:31:35 AM »
Discrepancies appear to be based on the unfortunate fact that Gunbot v3.3.3 through v5.0.4 has been using a public technical analysis code library, in the hopes that it would be an improvement. Quite the contrary, it has caused problems and inaccuracies in both SMA and EMA calculations.

This looks like a full fix in 5.0.5, with accurate SMA and EMA calculations. The formulas as stated in this post will continue to be correct, and I hope to be publishing an EMA explanation in the next couple days - but I will wait for 5.0.5 to be released because EMA configuration will be changing.

In the meantime, Robert, your math looks good, it's just your bot getting some inconsistent data collection.
If you find my discussion useful, buy me a drink: 17vaWPJeDN7YXfRu6TRrwUDY8ETTPtJuCu

Offline allanster

  • Contributor
  • **
  • Posts: 128
  • lux ex tenebris • deuro mea umbra absens
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #25 on: September 24, 2017, 06:43:26 AM »
Thank you for taking the time to write this! Very enlightening and impressive job. Keep up the good work.
more human than human

Offline Mann_mit_Hut

  • Rookie
  • *
  • Posts: 14
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #26 on: September 24, 2017, 07:47:15 PM »
My support to: good job and I'm willing to continue with help and data  :D

Offline Culture

  • Rookie
  • *
  • Posts: 40
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #27 on: September 25, 2017, 12:56:55 AM »
Well, hopefully in just a few days, this post will be irrelevant, if at at least academic. Gunthar recently committed some nice things to GitHub, specifically that SMA and EMA values in the config file will be in exchange chart units!!

This will make it much easier for us to get our heads around Gunbot's behaviors.
If you find my discussion useful, buy me a drink: 17vaWPJeDN7YXfRu6TRrwUDY8ETTPtJuCu

Offline kobalt

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #28 on: September 25, 2017, 02:27:33 PM »
Wow, great post, very helpful!

This is probably very obvious to most of you, but why does pure BB strategy use "SMAPERIOD": 50 and and others like the bbstepgain, bbgain "SMAPERIOD": 150? how does this correlate the the same BB?

I'm also a Sjakils GunthyGUI user and think those Bollinger Bands are pretty odd.. When looking for optimal buy sell levels and it's often totally curved/diagonal.. Due to it being a small part on the screen only.. Would love a uniform way and same BB everywhere, thanks! Will try your settings and looking forward to Sjakils next update!

 

Offline Culture

  • Rookie
  • *
  • Posts: 40
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #29 on: September 25, 2017, 04:28:49 PM »
Wow, great post, very helpful!

This is probably very obvious to most of you, but why does pure BB strategy use "SMAPERIOD": 50 and and others like the bbstepgain, bbgain "SMAPERIOD": 150? how does this correlate the the same BB?

I'm also a Sjakils GunthyGUI user and think those Bollinger Bands are pretty odd.. When looking for optimal buy sell levels and it's often totally curved/diagonal.. Due to it being a small part on the screen only.. Would love a uniform way and same BB everywhere, thanks! Will try your settings and looking forward to Sjakils next update!

The SMAPERIOD in your BB strategy and the SMAPERIOD in your BBSTEPGAIN strategy are simply set differently.  They are not meaning to correlate - and will not correlate.  Those may be the values in the default provided config.js file, but are not intended to produce the same input landscape for Gunbot.  That's up to you and your preferences.
If you find my discussion useful, buy me a drink: 17vaWPJeDN7YXfRu6TRrwUDY8ETTPtJuCu

Offline kobalt

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #30 on: September 27, 2017, 04:19:03 AM »
Ah awesome thanks for clarifying this.

Perhaps unrelated but not entirely sure..
Do you know how to make gunbot more sell happy, I have seen it go over step2 in the GUI green +1.3% or something similar then drop back without a sale, kida feels it needs baby sitting...  ???

Maybe a slightly tweaked version "STDV": 1.9 would be more aggressive? I'm pretty sure EMA doesn't do anything I can pick up on, tried bbstepgain with 5 minute interval with EMA 1 + EMA 2 with:
2000/1000, 200/50, 4/2, also tried 8/4 really cannot notice any difference..;)
AVGPOINTS from default 250-15 still had missed sells now trieing this bbstepgain setting which either way it has to go up or sell but even this simply does not always detect quick enough:

Yesterday made a nice 5.6% sell with this config on poloniex:

By the way this is on topic..: Do you have the correct SMA EMA1, EMA2 and BB settings for Poloniex for me? It doen't quite look right..  :D And can't seem to find the post anymore..

"bbstepgain": {
         "BTC_TRADING_LIMIT": 0.02,
         "PERIOD": 5,
         "HIGH_BB": -5,
         "LOW_BB": 5,
         "STDV": 2,
         "SMAPERIOD": 360,
// even set it to 15 minute candles i see lol.. now returned to default 150 for bbstepgain
         "SELLLVL1": 1,
         "SELLLVL2": 0.9,
//have these higher noew but seeing it nicely uses what it needs from level 3 then sells im sticking with lover values that ensure a sell when it's in reach when it drops back it can buy again!
         "SELLLVL3": 70,
//also varied using lower values for this as it might be selling faster if set to 10, don't think so..
         "SELLLVL": 2,
         "LASTPOINTS": 5, //toying aroind with more avg points like 10
         "AVGPOINTS": 35,
// often have this around 50 or so 20 had it sell to early on an uptrend , but when debagging have set this to lover values like 15 which didn't make it anny more trigger happy when it comes to selling..
         "AVGMINIMUM": 1e-8,
         "EMA1": 4,
         "EMA2": 2,
         "PANIC_SELL": false,
         "DOUBLE_UP": false,
         "STOP_LIMIT": 75,
         "BUY_ENABLED": true,
         "MIN_VOLUME_TO_BUY": 0.02,
         "MIN_VOLUME_TO_SELL": 0.0195

Currently checking out if this stepgain config works as intended and level one makes it sell and how it performs!
« Last Edit: September 27, 2017, 05:03:20 AM by kobalt »

Offline Mann_mit_Hut

  • Rookie
  • *
  • Posts: 14
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #31 on: September 27, 2017, 01:15:55 PM »
Hey Kobalt,

Since STDV is only for BB, it only affects you buys, not your sells.
I also use a low sellevel to get out fast and reduce bags and rely on a small AVGPOINTS/LASTPOINTS as a fast turnaround-detector, i use 20/5. If you reduce these settings more, for example to 10/3 could solve your problem

Offline kobalt

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #32 on: September 27, 2017, 11:41:08 PM »
Read somewhere it suited a more agressive trading style, will look it up and post the link.

Thanks, I'm currently using 20/5 or 15/5 for fast action and default catch pump not sluggish 50/5 and use 150/20 for long rides even 250/10 when neo goes at it again ;) for these settings!, still I sometimes see a pair with a +3profit in the gui and keep myself from intervening even tho highly overbought etc, but I almost always regret it... When the candle/price changes it doesn't catch it , sort of defeats the purpose of trendwatcher (i know its more history trend, but it should act damm quick and catch that as it's not going to get a heads up...same as fast oversold dips and sometimes it does, could this be due to running to many pairs?? I still feel I need to baby sit it ;D. (Even the hi-lo-hi stepgain settings won't catch it when a candle collapse i've seen btw) What could we do to safe guard our profits like a stop take profit feature, a conditional order would also be too late i'm guessing, but then again why aren't stop losses? mmmm still a lot to learn.. ;)
« Last Edit: September 27, 2017, 11:55:49 PM by kobalt »

Offline Culture

  • Rookie
  • *
  • Posts: 40
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #33 on: October 01, 2017, 01:57:59 PM »
For those of you braving the v5.0.5.x nightly builds, with the closing proxy server (API.gunthy.org) please note that if you're using the proxy either because that's the version, or using GUNTHY_API = true, the server closing array uses traditional chart units. So don't use 720, use 20.

If you switch GUNTHY_API to false, you need to go back to 720.
If you find my discussion useful, buy me a drink: 17vaWPJeDN7YXfRu6TRrwUDY8ETTPtJuCu

Offline kobalt

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #34 on: October 01, 2017, 10:25:23 PM »
For those of you braving the v5.0.5.x nightly builds, with the closing proxy server (API.gunthy.org) please note that if you're using the proxy either because that's the version, or using GUNTHY_API = true, the server closing array uses traditional chart units. So don't use 720, use 20.

If you switch GUNTHY_API to false, you need to go back to 720.
This is a bit confusing  :o :D

Im currently still on 5.0.4 but thinking of upgrading to the new nightly 5.0.54.
I hear on Bittrex, the only method to get good calculation is with GUNTHY_API=true
So to match exchanges with 15 minute intervals set 20
and 5 minute period use SMAPERIOD=6.7?

Then with "true" you must use SMAPERIOD=10 to match Sjakil's GUI

If you like 5-min candles, use SMAPERIOD= 3.3 to match Sjakil?

If this is the case ouldn't it make life easier when adjusting buy / sell levels in GunthyGUI to ignore BB and look at the candles instead of adjusting everything to fit the GUI?
« Last Edit: October 01, 2017, 11:29:20 PM by kobalt »

Offline Culture

  • Rookie
  • *
  • Posts: 40
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #35 on: October 02, 2017, 01:48:10 AM »
From v5054 Release Notes: 

... EMA and BB calculations can mirror exactly what you see at charts, provided the following:

If you are using gunthy api (GUNTHY_API true) for Bittrex and Cryptopia only:

set PERIOD to 5/15/30/60 the same than you have on chart

set EMA1 end EMA2 equal to the number of candlesticks you have in the period of observation. Example: if you have PERIOD 15 and you want to use 2 hours, set EMA1 to 8. For 4 hours: set EMA2 to 16.

The BB formula is provided like this you can change any of those values in config, provided array is "close":

Middle Band = SMAPERIOD simple moving average (SMA)
Upper Band = SMA (from above Middle Band) + (SMAPERIOD standard deviation of price x STDV)
Lower Band = SMA (from above Middle Band) - (SMAPERIOD standard deviation of price x STDV)
If you are not using gunthy api (GUNTHY_API false):

For Poloniex and Kraken:
set PERIOD to 5/15/30/60 the same than you have on chart
set EMA1 end EMA2 equal to the number of candlesticks you have in the period of observation. Example: if you have PERIOD 15 and you want to use 2 hours, set EMA1 to 8. For 4 hours: set EMA2 to 16.
The BB formula is provided like this (you can change any of those values in config, provided array is "close"):
Middle Band = SMAPERIOD simple moving average (SMA)
Upper Band = SMA (from above Middle Band) + (SMAPERIOD standard deviation of price x STDV)
Lower Band = SMA (from above Middle Band) - (SMAPERIOD standard deviation of price x STDV)
For Bittrex and Cryptopia:
Bittrex and Cryptopia do not provide "close" array in their api, the settings are as below:
We use "tickers" array (last price) and we collect them with the following settings:
"interval_ticker_update": 25000, // one price every 25 seconds: set this to 360000 for 5 minutes array or to 900000 for 15 minutes array
"period_storage_ticker": 2000, // to be used the same than SMAPERIOD
If you set these 2 values as above mentioned you can use EMA1, EMA2, SMAPERIOD the same as above formulas and get the same exact values than what you see on charts.
If you find my discussion useful, buy me a drink: 17vaWPJeDN7YXfRu6TRrwUDY8ETTPtJuCu

Offline Culture

  • Rookie
  • *
  • Posts: 40
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #36 on: October 02, 2017, 01:55:46 AM »
For those of you braving the v5.0.5.x nightly builds, with the closing proxy server (API.gunthy.org) please note that if you're using the proxy either because that's the version, or using GUNTHY_API = true, the server closing array uses traditional chart units. So don't use 720, use 20.

If you switch GUNTHY_API to false, you need to go back to 720.
This is a bit confusing  :o :D

Im currently still on 5.0.4 but thinking of upgrading to the new nightly 5.0.54.
I hear on Bittrex, the only method to get good calculation is with GUNTHY_API=true
So to match exchanges with 15 minute intervals set 20
and 5 minute period use SMAPERIOD=6.7?

Then with "true" you must use SMAPERIOD=10 to match Sjakil's GUI

If you like 5-min candles, use SMAPERIOD= 3.3 to match Sjakil?

If this is the case ouldn't it make life easier when adjusting buy / sell levels in GunthyGUI to ignore BB and look at the candles instead of adjusting everything to fit the GUI?

You're correct that the only way Bittrex Gunbots can get accurate calcs is by way of the gunthy API.

using this GUNTHY_API makes configuration very easy. If you want to use GunthyGUI charts, set SMAPERIOD to 10. Set the PERIOD to whatever is best for that coin, and user the same chart in Sjakil's GUI. (don't calculate anything more - if you set gunbot period to 15, use the 15min chart in the GUI. if you set 5 min candles, user the 5 min chart)

If you find my discussion useful, buy me a drink: 17vaWPJeDN7YXfRu6TRrwUDY8ETTPtJuCu

Offline toomeke

  • Rookie
  • *
  • Posts: 6
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #37 on: October 04, 2017, 07:26:38 AM »
Im lost...on 5.0.5RC, bittrex, 5min candles, BBSG....what setup do I need to rock? I cant work it out...! HEEEEELP
How much moola you makin? Get 10% off Cointracker NOW...it totally makes sense of your trading portfolio!
https://cointracking.info?ref=T684304

Offline Culture

  • Rookie
  • *
  • Posts: 40
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #38 on: October 04, 2017, 12:59:03 PM »
Im lost...on 5.0.5RC, bittrex, 5min candles, BBSG....what setup do I need to rock? I cant work it out...! HEEEEELP

For that config you need gunthy_api=false and use standard chart units like SMAPERIOD=20
If you find my discussion useful, buy me a drink: 17vaWPJeDN7YXfRu6TRrwUDY8ETTPtJuCu

Offline defvader

  • Rookie
  • *
  • Posts: 8
    • View Profile
Re: GUNBOT v5: Setting up your BB strategy to match CHARTS
« Reply #39 on: October 04, 2017, 01:04:53 PM »
Im lost...on 5.0.5RC, bittrex, 5min candles, BBSG....what setup do I need to rock? I cant work it out...! HEEEEELP

For that config you need gunthy_api=false and use standard chart units like SMAPERIOD=20

For 5 minute charts on Bittrex, using 5.0.5, should the SMAPERIOD not be 120? Also using Sjakil's gui I should add. Thanks for all of your hard work and knowledge!