please help coding this system

 

Please house i need this system to be coded to an EA it is daily high and low break. If previous day high or low is break by 10pips then EA will buy for high or sell for low the stoploss and take profit must be adjustable or put stoploss at the opposite side, but if neither takeprofit nor stoploss is reached at the end of the day the EA must be able to close the trade automatically if it positive but if negative the stop loss should be adjusted to new high or low depend on open position

Reason: