Crossover of 2 EMA but pending order

 

I'm trying to make EA for 2 EMA crossover but when 1st ema crossed 2nd ema I want it to send a pending order instead a market execution order,

I got source code from this website. But when I try to edit for my EA version, I get confused about code that I want to edit.

I think, the code that I need to edit is in this line.

bool CSignalCrossEMA::CheckOpenLong(double& price,double& sl,double& tp,datetime& expiration)
  {
   if(!(StateEMA(2)<0 && StateEMA(1)>0)) return(false);
//---
   price=0.0;
   sl   =0.0;
   tp   =0.0;
//---
   return(true);
  }

And this line

bool CSignalCrossEMA::CheckOpenShort(double& price,double& sl,double& tp,datetime& expiration)
  {
   if(!(StateEMA(2)>0 && StateEMA(1)<0)) return(false);
//---
   price=0.0;
   sl   =0.0;
   tp   =0.0;
//---
   return(true);
  }
But when I edited, it got the error. I have tried diffirent ways to edited but also got error. So I am here to ask you guys. I understand a litle bit about how to write programing code. And now I'm learning to make some simple EA. Can someone help me to finish this?
 

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 difficulty.
          No free help (2017)

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

We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
          No free help (2017)

Do not post code that will not even compile.