Trade Script code

Hi
Kindly help me to write trade script code for below mention strategy.

In 15 minutes chart
candle closing price is high from last four candle high then give signal for buy and opposite for sell.

Thanks
Ranjeet