Sale stock at 1%

I want to create a system in which my shortlisted script should show buy signal, if the current price move by 1% from the market open price & the same should generate sell signal once it touches 0.5% above the buy price. Ex. If stock price opens at Rs 100 and in 15 minutes it reaches Rs 101. Then it should generate buy signal and once it reaches Rs 101.50 it should generate sell signal. And with a stop loss of 0.5 % below buy price.