Need help to code this strategy for amibroker

Hello mate. my strategy is When a candle break first 15 minutes high and another candle breaks the 2nd high. And Dinapoli Preferred Stochastic is above 20 and Relative Volatility Index is above 50 if all this condition satisfies then buy. Stoploss is low for the 2nd breaking candle.
when a candle break 1st 15 minute low and another candle break 2nd braking candle low and Dinapoli Preferred Stochastic is less than 80 and Relative Volatility Index is less than 50.

Stoploss is high on the 2nd braking candle.