help - bollinger band expert advisor

 

Please i need your help to code my ea on bollinger band indicator,default setting(20,2).

i want it to place a buy order if the opening price on previous bar(bar 1) is less than the value of middle line of bollinger band, and the high price also on bar 1 is greater than bollinger band middle line's value,

i want it to place a sell order if the opening price on previous bar(bar 1) is greater than the value of middle line of bollinger band, and the low price also on bar 1 is less than bollinger band middle line's value,

Just write the buy and sell instructions above for me, i will finish the rest. thanks in advance.