Suppose there are related securities, such as two preferred stocks of the same company, whose price difference should trade in a narrow band. How would you poll the market at a relatively low frequency (say every 5 minutes) and send an email when the price spread is outside a specified band? Since preferred stocks are pretty illiquid I am not looking to fully automate execution but to get alerts.