I don't think you really thought this through. You are asking for a scan that finds stocks currently trading below the session high. This is going to return almost the entire list of stocks included in you scan.
Go ahead and re-read your specification:
How can I find stocks whose last price is less than the highest price for the day?
So you want a scan that returns a list of stocks which are currently trading at least 1 penny below the current day's session high. Nearly every single stock in the market is going to be picked up.
Nevertheless, here is the scan you requested:
plot scan = close < high;
You will apply this code to a Study Filter that is set to Daily time frame.
I just ran this scan myself. Out of a total of 9,023 stocks going into the scan, I found a total of 7,521 stocks were returned (meeting your criteria). Completely useless.