Username: Password:

Author Topic: Bollinger Band calculation  (Read 2750 times)

Offline hyippiemon

  • Trust: (0)
  • Rookie
  • *
  • Posts: 1
    • View Profile
Bollinger Band calculation
« on: April 26, 2017, 04:04:38 AM »
Is there a value to set for the "max latest prices" which is optimal for the calculation of the Bollinger Bands?
Or how it is calculated?

I used the default setting of 300.

%GAIN: 2
Sell strategy: GAIN
Buy strategy: BB
% Low BB: 1

Then started the bot for the first time with 3 coin pairs.
At night the bot bought coins that weren't not even near the lower BB (regarding to the Polo BB), way above the lower BB, more round the middle of the BBs.

Any suggestions?


Offline dobcrypto

  • Local Moderator
  • Trust: (+1)
  • Junior Member
  • ****
  • Posts: 278
  • Russian - native language
    • View Profile
Re: Bollinger Band calculation
« Reply #1 on: April 26, 2017, 10:08:50 AM »
Upper your "% Low BB: 1" to 50 for exemple. Then bot will try to buy between 0 and 50% of Low BB.
Telegram @dobcrypto
To get a 10% discount, tell the author a code "dobyGun"
My channel: http://www.youtube.com/dobcryptocurrency

Offline Cyperh

  • Trust: (0)
  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: Bollinger Band calculation
« Reply #2 on: April 26, 2017, 01:44:08 PM »
My also bought LTC in inverse way.
I've used default setting to 5% of BB for buy & sell.
Today has bought LTC at 5% of HIGH BB, not of LOW BB.

My fault? Where?

Online Gunthar

  • Administrator
  • Trust: (+1)
  • Junior Member
  • *****
  • Posts: 290
    • View Profile
  • Telegram: @GuntharDeNiro
Re: Bollinger Band calculation
« Reply #3 on: April 26, 2017, 01:51:31 PM »
I hope you all did read this:

Notice: when you first start your GUNBOT, it has not statistics yet, it needs to collect and build indicators.
Hence, to protect you from buying too high because the Bollinger Band are not completely calculated
yet, the GUNBOT will work using the GAIN strategy until it says the statistics are correctly loaded. It will
switch automatically to the Bollinger Band strategy when ready. So, be sure to properly set BUY_LEVEL
and GAIN % in all markets!

Offline Cyperh

  • Trust: (0)
  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: Bollinger Band calculation
« Reply #4 on: April 26, 2017, 02:17:52 PM »
I've read this, I'm asking because I don't understand.
After 24h of working and with enough statistics ( the bot is already in BB strategy I suppose, while not show me message of "Don't have enough statistics..."), the fact the bot have bought at the "wrong" price has surprised me.
I've check every trade my bot has done ( I've open only 4 pairs ) in last 24h, and all are correctly bought near Low BB band (  and correctly sold near High BB band with 3% profit  ;D ;D ).
This "error" has happened only one time, today, with BTC_LTC pair. The buy order has been placed @ 11:28 ( Polo time ) when LTC price was 0.01228.

Don't know if it can be a bug in new code or my fault in configuration.
Any suggestion Gun? Can you help me understand?

Online Gunthar

  • Administrator
  • Trust: (+1)
  • Junior Member
  • *****
  • Posts: 290
    • View Profile
  • Telegram: @GuntharDeNiro
Re: Bollinger Band calculation
« Reply #5 on: April 26, 2017, 02:29:05 PM »
I've read this, I'm asking because I don't understand.
After 24h of working and with enough statistics ( the bot is already in BB strategy I suppose, while not show me message of "Don't have enough statistics..."), the fact the bot have bought at the "wrong" price has surprised me.
I've check every trade my bot has done ( I've open only 4 pairs ) in last 24h, and all are correctly bought near Low BB band (  and correctly sold near High BB band with 3% profit  ;D ;D ).
This "error" has happened only one time, today, with BTC_LTC pair. The buy order has been placed @ 11:28 ( Polo time ) when LTC price was 0.01228.

Don't know if it can be a bug in new code or my fault in configuration.
Any suggestion Gun? Can you help me understand?

1228 is "exactly" at x% from lowest ema, i assume your bot was running on "GAIN" strategy or it woudnt have bought LTC at all in the past 24 hours

Offline Cyperh

  • Trust: (0)
  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: Bollinger Band calculation
« Reply #6 on: April 26, 2017, 02:50:16 PM »
Ok it make sense.
In this case, how can I understand if my bot is running in BB strategy or Gain?
I've assumed that, when the "Don't have enough statistics..." message disappear, my bot has switched to BB strategy.
I'm correct?

One thing I don't understand, looking in Polo graph when I see 0.01228 @ 11:28 I see a price near the High BB as show in the attached image.
Am I looking at the wrong place or in the wrong way? Or simply ( and most likely :) )I don't understand how to read EMA and BB?

Thanks for clarify

« Last Edit: April 26, 2017, 03:18:38 PM by Cyperh »

Online Gunthar

  • Administrator
  • Trust: (+1)
  • Junior Member
  • *****
  • Posts: 290
    • View Profile
  • Telegram: @GuntharDeNiro
Re: Bollinger Band calculation
« Reply #7 on: April 26, 2017, 04:26:39 PM »
Ok it make sense.
In this case, how can I understand if my bot is running in BB strategy or Gain?
I've assumed that, when the "Don't have enough statistics..." message disappear, my bot has switched to BB strategy.
I'm correct?

One thing I don't understand, looking in Polo graph when I see 0.01228 @ 11:28 I see a price near the High BB as show in the attached image.
Am I looking at the wrong place or in the wrong way? Or simply ( and most likely :) )I don't understand how to read EMA and BB?

Thanks for clarify

Yeah you need to set ema1 and ema2 at 8 and 16 at poloniex graphic and you will see that price is right below ema

Offline Cyperh

  • Trust: (0)
  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: Bollinger Band calculation
« Reply #8 on: April 26, 2017, 06:24:41 PM »
Ema 1 e 2 are already with these settings, in fact I don't understand.
There's something I'm missing....
In Polo Candlestick 15 min & Zoom 24h?

Online Gunthar

  • Administrator
  • Trust: (+1)
  • Junior Member
  • *****
  • Posts: 290
    • View Profile
  • Telegram: @GuntharDeNiro
Re: Bollinger Band calculation
« Reply #9 on: April 26, 2017, 07:36:25 PM »
Ema 1 e 2 are already with these settings, in fact I don't understand.
There's something I'm missing....
In Polo Candlestick 15 min & Zoom 24h?

here it is

Offline Cyperh

  • Trust: (0)
  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: Bollinger Band calculation
« Reply #10 on: April 26, 2017, 07:45:25 PM »
Ok, now I see price as you say.
Just for understand, I'm a bit confused, Polo graph had to be 8-4 or 8-16?
Yeah you need to set ema1 and ema2 at 8 and 16 at poloniex graphic and you will see that price is right below ema

Online Gunthar

  • Administrator
  • Trust: (+1)
  • Junior Member
  • *****
  • Posts: 290
    • View Profile
  • Telegram: @GuntharDeNiro
Re: Bollinger Band calculation
« Reply #11 on: April 26, 2017, 08:17:13 PM »
Ok, now I see price as you say.
Just for understand, I'm a bit confused, Polo graph had to be 8-4 or 8-16?
Yeah you need to set ema1 and ema2 at 8 and 16 at poloniex graphic and you will see that price is right below ema

You have to set ema the same value the bot is getting based on your settings: poloniex gets prices at every tick in microseconds directly from their order book, your bot gets one price every tick you have in bot delay time. You will never get the same values, that's why i always suggest to work with the bot values, not with poloniex graphic values: if you still have logs, scroll back to that buy order and look at ema values the bot got in that moment (if your console cleaned up you should have those values in the log file)

Offline Cyperh

  • Trust: (0)
  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: Bollinger Band calculation
« Reply #12 on: April 26, 2017, 10:29:39 PM »
O, I think I've understand ( a little.... ).
So bot have his independent calculation for the bollinger bands, right? Now I see BTC_LTC HighBB @ 0.01188 on bot while on Polo I see HighBB @ 0.01246...correct?

Last question: in my bot have default set EMA 1/2 @ 0.02/0.04 for BB, EMA 1/2 @ 4/2 on 1000trades......Why??? Can you explain me this last thing and how to calc by myself this value please?

Offline very_452001

  • Trust: (0)
  • Rookie
  • *
  • Posts: 5
    • View Profile
Re: Bollinger Band calculation
« Reply #13 on: April 27, 2017, 02:38:59 PM »
Ema 1 e 2 are already with these settings, in fact I don't understand.
There's something I'm missing....
In Polo Candlestick 15 min & Zoom 24h?

here it is

Hi Gun,

Newbie question: Do i set those settings for all coins at the poloniex website? These settings are for bollinger band strategy?

Offline xgast

  • Trust: (0)
  • Rookie
  • *
  • Posts: 10
    • View Profile
Re: Bollinger Band calculation
« Reply #14 on: July 05, 2017, 07:55:21 PM »
Hello Gunthar,

Please help me understand Bollinger Band strategy on GunBot v3.3.2..., after bot buy coin when the price goes x% above the lowest BB (or better price) and then price go even extremly lower suddently why bot not buy more coin even there are still much more Bitcoin available...

thanks for your explaination..