Support/Resistance Seetu Program

What would the code look like if support and resistance is breached. If the user defines support or resistance based on certain price values. These price values change day to day and the user would need to update the seetu algo. The system maintains a fixed number of contracts long above resistance and short below support. If price crosses the support from above, the system checks to see if any open long positions and gets short (reverses) at the next bar below support. If price crosses the resistance from below, the system checks to see if any short positions and gets long (reverses) at the next bar above resistance. Also the system limits itself to run on certain dates and certain times during the day.

thank you,
Chris