Auto Pending Order on MA Price EA

 

Hello reliable EA gurus in da house.....please can anyone help me code an EA that sets automatic pending order on an MA line/price with sl and tp with the MA visible on the chart? What I want is when price is above the MA, the EA should set automatic buy pending order on the MA line/price on every new candle opening until it is triggered and if price is below the MA it should plot automatic sell pending order on the MA line/price on every new candle opening until it is triggered. For instance if I put the EA on 15mins tf, it should plot a new pending order every 15mins on the MA line/price until it is triggered....same thing for all timeframes. When the pending order is triggered, the EA should automatically disable and can only be enabled manually again. Hope you understand? Thanks alot.