Great explanation sloaleks, thanks for taking the time to help out us noobs. You bring up a point I don't fully undersatnd in the last part there; you say that the price does not need to be inside the bands, I realize this but when is it that the bot decides to make a decision to buy/sell? Immediately when the price is achieved OR when a candlestick closes with the top/bottom in your range OR maybe when the following candlestick closes with a reverse direction...? What is the deciding factor for the bot?
One more thing is with regard to periods vs SMAPERIOD candlestick number. If SMAPERIOD = 50 I shift the PERIOD to 5 does that mean the SMA is calculated over the past 5*50 = 500 candlesticks? If so, to visualize the chart that the bot is using must I create a BB indicator on a chart with the "length" set to the SMAPERIOD and the candlestick period = PERIOD? Is that right?
Thanks again.
I'm not very sure when exactely the buy or sell cycle starts, because I'm not able to exactely reproduce the market bbs on my bots decisions. Let's say, it goes into buy or sell cycles in the immediate vicinity of the set low and high bb. The deciding factor should be the breach of the set low and high value, but I'm also aware, the price don't just stop there. So, I'm farely confident the bot buys really really close to what it is set. On selling, not so sure. I have had moments, when the sell was performed under the minimum gain, which shouldn't have happened, and I have had it "loose" several peaks, when the price clearly went over the set high bb (and I have then sold manually, because the trend reversed already). But in general it works very close to what it is set (talking pure bb here).
Yes, the change in your period affects you SMA calculation. If set like you wrote, your SMA is calculated over 50 candlesticks of 5 minutes each, so over 250 minutes.
And yes again, to exactely visualize the charts, you should have set the same periods on the chart and on the bot. To replicate bbs you also should have the same SMA, so set the same on your bot and on your exchange the SMAPERIOD.