Time for buying and selling

 

How to buy or sell only after the particular day of stock market ends and before the next day stock market starts ?

Can we use a particular function for the same or any other ideas for the same ?