The default ranking day and trading day is the close of the last trading day of the month. If you enter 31 as ranking day, the QT just searches the latest trading day of the month. We only use closing prices, so QT never trades at open.
By default QT ranks and trades at close of the last trading day of the month. This is not really possible, however what you can do is to download the 15min delayed prices for example at 3pm of the last trading day and then do “at close” orders. It is very rare that the allocation changes within the last hour.
Trading delay also always uses the next trading day as the calendar days entered may not be trading days (Saturday/Sunday …)