Works in practice but not on live

 

Hi I'm new to this and my programme does exactly what I want it to do on the practice account but not on the live account any suggestions as to why this might be?

 
You have errors within your code.. Keep working on it.
 

Don't use this kind of coding....

   total=OrdersTotal();
   if(total<1) 
     {
      // no opened orders identified
to find out there is no open order
 
deVries:

Don't use this kind of coding....

to find out there is no open order

What code should be used?

Is " if(OrdersTotal()==0) " ok?

 
apult:

What code should be used?

Is " if(OrdersTotal()==0) " ok?

OrderTotal() included Pending orders, orders for all EAs, and any manually placed orders.
Reason: