Please code my detailed strategy to generate automated Buy/Cell calls in PI

Buy (Long) Criteria:    
Time: 9:45 am - 2:55 pm  
Candle: 5 Minutes  
     
User Inputs:    
Backtest Start Date    
Backtest Stop Date    
Phone 1    
Phone 2    
Phone 3    
Order Type Limit, Market  
Order Segment NRML, Margin, CNC  
Order Qty    
Exit Type SL, SL-M, Limit, Market  
Opening diff Long: OpdiffL    
Price Diff Long: PdiffL    
StopLoss Long: SlossL    
Target Long: TargetL    
     
Parameters:    
ORH = High of First 30 Minute Trade    
ORL = Low of First 30 Minute Trade    
PDH = Previous Day High    
PDL = Previous Day Low    
PDC = Previous Day Close    
     
     
HVBH = Identify High Volume Bar in first 30 Min Trade, High of corresponding Price Bar
HVBL = Identify High Volume Bar in first 30 Min Trade, Low of corresponding Price Bar
     
Moving Average:     
  Period 9
  MA Type Exponential
     
Buy (Long) Criteria:    
     
No Buy Call, if Nifty is in down trend:    
  Nifty < OpdiffL points from opening price  
     
IF    
  PDC < Average (PDH, PDL, PDC) AND  
  If current price > ORH AND  
  (Moving Average > ORH OR  
  If Inside bar is True OR  
  (High and low of current bar is less than High and Low of Previous Bar)
  Volume of current bar is 30% > average volume of last 10 Bars OR
  Average Volume of first 30 Min Trade >  
  Average Volume of last 20 days)  
end if    
     
Order Type:    
  Order Type  
  Order Segment  
  Order QTY  
  "@Current Price - PdiffL  
     
Exit with Profit:    
a) Trailing Stop Loss    
  If  
  Target is met, exit if 20% of target profit is lost (For example, if target is 50, revise stop loss will be at 40, and so on)
  If Profit > Target then  
  Stoploss = Profit * 80%  
  Endif  
     
b) If reverse call is generated    
  If current price < ORL AND  
  (Moving Average < ORH OR  
  If Inside bar is True OR  
  (High and low of current bar is less than High and Low of Previous Bar)
     
     
c) End of day exit at 3:25 pm    
     
Money Management Stop:    
if    
  Loss is > = SlossL  
  Price is < ORL OR  
  price is < HVBL  
     
Generate sound alert and send SMS to predefined numbers
     
     
     

Many thanks,

Naveen

As per the above condition you can not give any time limit or define any time with respect to condition in tradescript