how to book profit in stock market automatically