How to create algo for MACD Momentum Trading strategy?

How to create algo for MACD Momentum Trading strategy?

Condition:
The MACD indicator is one of the most popular indicators to determine trending prices. The basic trading rules is to buy when it cuts above zero line or buy when its cuts above signal line. When the direction of trend is not clear, MACD stays close to the zero line.

The trading idea is simple.
We need to buy when
• trend is strong
• there is momentum in market
• the market is not sideways

Buy Condition: MACD above 0 and MACD above Signal Line and MACD above 25 and Signal candle is beyond Bollinger Band
Sell Condition: When either MACD below 0 or MACD below Signal Line

Reverse is applicable for shorting.