Buy/short at market price when price touches the high/low of a signal bar

Hi..,
i have written a code for getting a buy/short signal on the candle crossing and closing of BB top(default values) and simultaneously RSI (14) crossing and closing above 60..the code is below..,but i actually want to buy or sell at market price, the moment the current market price touches at the high/low of the signal candle....i tried using some methods but not able to
get the desired result...can some one help...

_SECTION_BEGIN("Buy Sell Arrow Signals");

Buy   =Cross(C, BBandTop( C,20, 2 )) AND  Cross( RSI(14), 60 );
Sell   =Cross(BBandBot( C,20, 2 ), C) AND  Cross( 40, RSI(14) ) ;
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-30);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0, L, Offset=-40);                      
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-35); 
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=30);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=40);                      
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-35);

_SECTION_END();

Hi @RSKU0001,

  1. You will need to set the BuyPrice / SellPrice in your code.

  2. What data feed are you using?

  3. Are you trying to run this as a BackTest (need to set Trade Delays) or as LiveTrading?