My ea is not closeing orders when the condition is me on live.

 
if(condition==true)
{ //Opposite as the OP_BUY Stop Loss scenario.
RefreshRates();
while( OrderClose(t,OrderLots(),Ask,Slippage, Green)!=true){Sleep(500);}
}


This works fine with the backtester but with live trading I get no result not even a log entry. The EA button is on.

Other EAs have worked but now that I have one that works the mt4 platform isn't letting me use it.Any help is greatly appreciated.

 

feels like sabotage. just reinstalled it and am currently waiting for results.

same thing is happening.

 
What error do you get back ? you are checking the return code and reporting the error if the OrderClose fails ?
 
what happens if you change Ask to 0?
 

What is the order type? You can only close buy and sells, you must delete pending orders.

Always test your return codes and print the error code so you find out WHY.

Reason: