Need Tradescript code for following strategy

Need Tradescript code for following startegy.

A. Condition for Buy : Met all three conditions simultaneously.
01. 15 min candle CLOSE above Upper Bollinger Band
And
02. DI+ CLOSE at or above 40.
And
03. MACD is grater than 0.

B. Condition for Sell : Met all three conditions simultaneously.
01. 15 min candle CLOSE below Lower Bollinger Band
And
02. DI- CLOSE at or above 40.
And
03. MACD is less than 0.

This scan will perform in every 15 minute for example, 1st scan runs at 9:15 then 9:30 then 9:45 and so on.

#buy signal script for pi using tradescript
CLOSE > BBT(CLOSE, 14, 2, EXPONENTIAL) AND #14-> no of days 2->sd away exponential->type of
DIP(14) > 40 AND #averaging. you may choose your own custom values
MACD(13, 26, 9, SIMPLE)>0

#similarly sell script logic can be implemented. BOL!! use it in scanner for 15 minutes period and with proper exits i would suggest you to backtest first. hope it helps