How to trade with below stratagy

Buy= williamsr%(20) cross -30 in 10min time frame buy above candle high + 10points

​Ex -10min time frame candlecomplete9.30am open =1000, low=990 high=1010 so buy above 1020 and sl 990 and target = (1020-990 =30 ) 1020+30 =1050

Sell= -70 cross williamsr%(20) in 10min time frame sell below candle low - 10points

​​Ex -10min time frame candlecomplete9.30am open =1000, low=990 high=1010 so sell @ 980 and sl 1010 and target = (1010-980 =30 ) 990-30 = 960

As per above condition

Buy Script:

SET A = WPR(20) < -30 
A+10

Sell Script:

SET A = WPR(20) < -70 
A-10

For Exit buy and sell you can use price alert indicator

https://zerodha.com/expert-advisors/code/price-alert-indicator