Setting Trade delays for the specific time

Hello everyone,

I am trying to set trade delay for the next candle after getting buy/sell signal on a specific time.
On a daily timeframe, when I get the buy/sell signal after close crossing the HL averages I want to take position at the NEXT DAY candle at 9:25 AM and backtest accordingly. I tried to do it with Timenum() but I wasn't able to plot it properly to get my results. Can anyone tell me how do I set specific time for trade delay? Thanks in advance.

Here's my code-

/*
1.Plot Chart
2.Plot Ema on Highs and Lows
3.Plot buy/sell signals
4. Entry on specific time.
5.Apply Stoploss
6. Add Transaction cost
7. Set Trade Delay
*/
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
		_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
			Plot( C, "Close", ParamColor("Y-Axis Price Color", colorDefault), styleThick | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

_SECTION_BEGIN("EMAs");

	Hema = EMA(H, 10);
	Lema = EMA(L, 10);
	
	Plot(Hema,"Hema",colorOrange,styleLine);
	Plot(Lema,"Lema",colorYellow,styleLine);
		
		Buy = Close > Hema;
		Sell = C < Lema;
		Short = Buy; 
		Cover = Sell;
		
		
			Buy = ExRem(Buy,Sell);
			Sell = ExRem(Sell,Buy);
			Short = ExRem(Sell,Buy);
			Cover = ExRem(Buy,Sell);
					
		PlotShapes(IIf(Buy, shapeUpArrow , shapeNone), colorWhite, 0,Low, Offset=-20);
		PlotShapes(IIf(Sell, shapeDownArrow, shapeNone), colorYellow, 0,High, Offset=-20);
		PlotShapes(IIf(Buy, shapeUpArrow , shapeNone), colorWhite, 0,Low, Offset=-20);
		PlotShapes(IIf(Sell, shapeDownArrow, shapeNone), colorYellow, 0,High, Offset=-20);
				
_SECTION_END();
		
		

And here's the screenshot -
Screenshot%20(11)

Hello, I have tried multiple methods including the timeframeset functions, but I am still not able to get the entry price at 9:25 AM. One more way to do it is to get the opening price of 2nd 10 minute candle so I also tried with 2in5Minute functions. but I cannot get it to work yet. I have kept all the things i have tried so far in comments in the code, which one of these methods can i use to get the results that I want?
`/

1.Plot Chart
2.Plot Ema on Highs and Lows
3.Plot buy/sell signals
4. Entry on specific time.
5.Apply Stoploss
6. Add Transaction cost
7. Set Trade Delay
*/
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Y-Axis Price Color", colorDefault), styleThick | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("EMAs");

Hema = EMA(H, 10);
Lema = EMA(L, 10);

Plot(Hema,"Hema",colorOrange,styleLine);
Plot(Lema,"Lema",colorYellow,styleLine);
		ConditionB =  C > Hema;
		ConditionS = C < Lema;	
	
		tn = TimeNum();
		NextDay = Ref(Day(),1);
		starttime = tn == 091500;
		endtime = 	tn == 033000;
		
	
	TimeFrameSet(2*in5Minute);
		tm = Ref(Open, 1);
		inO = TimeFrameGetPrice( "O", 2*in5Minute, 1 );
		inH = TimeFrameGetPrice( "H", 2*in5Minute, 1 );
		inL = TimeFrameGetPrice( "L", 2*in5Minute, 1 );
		inC = TimeFrameGetPrice( "C", 2*in5Minute, 1 );		
	TimeFrameRestore();
	
	tmp = TimeFrameGetPrice("open",2*in5Minute,-1);
	plotting = TimeFrameExpand(tmp,2*in5Minute);
	Plot (plotting,"openingp",colorAqua,styleLine);
	
	SetTradeDelays(1,1,1,1);	
	Buy = ConditionB;
	Sell = ConditionS;
	Short = ConditionS;
	Cover = ConditionB;
	
	BuyPrice = tmp;
	SellPrice = tmp;
	ShortPrice = tmp;
	CoverPrice = tmp;
	
	Buy = ExRem(Buy,Sell);
	Sell = ExRem(Sell,Buy);
	Short = ExRem(Short,Cover);
	Cover = ExRem(Cover,Short);

/*
Kvhod = 130000;
ItsTime = Kvhod == TimeNum();
PriceAtTime = ValueWhen(ItsTime, Open);

	/*Entry = 092500;
	EntryTime = Entry == TimeNum();
	//PriceAtTime = ValueWhen(EntryTime, Open);
	//DayChange = Day() != Ref(Day(), 1); 
	
	TimeFrameSet(inDaily);
		ConditionB =  C > Hema;
		ConditionS = C < Lema;		
	TimeFrameRestore();
	
	
	
	/*
	TimeFrameSet(2*in5Minute);
	nextB = BarsSince(conditionB);
	nextS = BarsSince(conditionS);
		Buy = Ref(nextB,-1);
		Cover = Ref(nextB,-1);
		Sell = Ref(nextS,-1);
		Short = Ref(nextS,-1);
		
		Buy = ExRem(Buy,Sell);
		Sell = ExRem(Sell,Buy);
		Short = ExRem(Short,Cover);
		Cover = ExRem(Cover,Short);
		SetTradeDelays(1,1,1,1);
		
		/*BuyPrice = Open;
		ShortPrice = Open;
		CoverPrice =Open;
		SellPrice = Open;
		
	TimeFrameRestore();
	
	
	

	SetTradeDelays(1,1,1,1);
	BuyPrice = TimeFrameExpand(EntryPrice,inDaily);
	SellPrice = TimeFrameExpand(EntryPrice,inDaily);
	ShortPrice = TimeFrameExpand(EntryPrice,inDaily);
	CoverPrice = TimeFrameExpand(EntryPrice,inDaily);
	
	*/	
	
		
		
	PlotShapes(IIf(Buy, shapeUpArrow , shapeNone), colorWhite, 0,Low, Offset=-20);
	PlotShapes(IIf(Sell, shapeDownArrow, shapeNone), colorYellow, 0,High, Offset=-20);
	PlotShapes(IIf(Buy, shapeUpArrow , shapeNone), colorWhite, 0,Low, Offset=-20);
	PlotShapes(IIf(Sell, shapeDownArrow, shapeNone), colorYellow, 0,High, Offset=-20);

_SECTION_END();

`