Any idea for an mt5 ea to open and modify stop orders and close positions

 
I am new to mql5 programming, I tried to get a code that opens one stop order with entry price n-pips above current market price modify it every minute if not triggered (changing entry price to a better price following market movement. Intended for catching reversals). Close positions after m-minutes if tp or sl is not hit. Any help is much appreciated guys. Thanks.