Could you please write code for following strategy

~~buy= todays first 5 min. close > Previous day high and current price is greater than 1% of previous day high

sell=todays first 5 min. close < Previous day low and current price is less than 1% of previous day low

As per the above condition of different time frames it can not be coded by tradescript