I have no idea about profitability but condition 1 can be achieved with a custom indicator doing exactly what you say. Condition 2 is even easier.