Topic: How to add 2 Opening Condition like this?

1. If price break previous high, enter long position
2. and if price break previous low, enter short position.

How to make it? thanks..