Duplicate: Getting low price of the bar instead of close price

I am using below code to backtest on intraday data:

tn = TimeNum();

startTime = 091500; 
endTime = 150500;  
exitTime = 152000;  

timeOK = tn >= startTime AND tn <= endTime;

exit = (Low < Exitlevel) or cross(tn, exitTime);

SellPrice=iif(tn == 152000,(ValueWhen(Sell,Close)),(Exitlevel - 0.05));

SellPrice=iif(tn == 152000,C,(Exitlevel - 0.05)); // I tried this as well

however, I am getting low price of the bar instead of close price.

Thank you in advance.

It's a duplicate of this thread:

If you have already started one thread, don't create another identical one. It leads to a mess...

Where are your Buy and Sell variables assigned? Also, are you sure that you have bars that end at exactly 15:20:00?

changing it from tn == 152000 to tn > 152000 solved the problem.
@mradtke thanks for your time.