OrderClose error 4108 how can I do this to remove this error?......I'm a beginner

 
bool ris; 
bool ris2; 


if (OrderType()==OP_BUY &&mc1>mc2&&mc01<mc02 ) 
ris=OrderClose(ticket,lots,Bid,3,clrAqua); 

if(OrderType()==OP_SELL && mc1<mc2 && mc01>mc02) 
ris2=OrderClose(ticket,lots,Ask,3,clrBrown);

return(0);
 
  1. When you post code please use the SRC button! Please edit your post.
              General rules and best pratices of the Forum. - General - MQL5 programming forum

  2. 4108 means something completely different in MT5. Why did you post your MT4 question in the Root / MT5 General section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum

  3. if (OrderType()==OP_BUY &&mc1>mc2&&mc01<mc02 ) 
    You can not use any Trade Functions until you select an order.
  4. ris=OrderClose(ticket,lots,Bid,3,clrAqua); 
    Obviously your ticket variable is bogus. Do you even check if the order has already been closed, or if you haven't opened one yet?

  5. Check your return codes for errors and report them.
              What are Function return values ? How do I use them ? - MQL4 and MetaTrader 4 - MQL4 programming forum
              Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles

  6. Use the debugger or print out your variables, including _LastError and find out why.
 
you're right I'm wrong 

Reason: