If the market goes up... sell. If it doesn't move, sell. If it goes down, check to see how much. Maybe you should ask us what to do in that case... :) We already know.
You need the exact algorithm between US Dollar and SP, DOW, NASDAQ; otherwise, you are at sincere risk.