You have not specified any group number on any buy/sell pending block. They must match. For example, blocks 5 and 6 must be specified the same group (only block 5 is specified for group 1). Same for pairs 7-9, 10-15 and 16-19.
Is the bollinger bands indicator the only one expected to use in this strategy?
What do you mean by 'strong close above the middle line'? You will need to define it as accurately as possible because the EA will not be able to distinguish between a 'strong' and a 'weak' close.
You need to create a variable like mine with an initial value of 0. Then you can modify when you want to begind/end counting on blocks 2 and 4 in my example.