Single moving average EA

 
Please can somebody help me on this.Iam building this single ema moving average-EA, But my problem is this, how to  write it and put it in Custom code......
( Prevent my EA from opening new trades after TP, SL or TRAILING STOP untill another cross over occur.
Files:
 
  1. Help you with what? You haven't stated a problem, you stated a want.

    Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help
              urgent help.

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum

  2.   //Open Buy Order
       if(Close[1] > iMA(NULL, PERIOD_CURRENT, 10, 0, MODE_EMA, PRICE_CLOSE, 0) //Candlestick Close > Moving Average
    
    Look for a cross, not a level.
    double aPrev = …, aCurr = …,
           bPrev = …, bCurr = …;
    bool   wasUp = aPrev > bPrev,
            isUp = aCurr > bCurr,
           isCross = isUp != wasUp;