What is wrong here (BB EA)? - page 2

 
Erlend Christiansen #: Anyway. With one warning only the EA should work?
Don't hope, don't pray, don't maybe
   for (int i=OrdersTotal()-1; i>=0; i--)
      {
      OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
      if (OrderSymbol() == pair) total++;
Fix the problem.
   for (int i=OrdersTotal()-1; i>=0; i--) if(
      OrderSelect(i,SELECT_BY_POS)
   && OrderSymbol() == pair
   ) total++;
 
I don't have access to my laptop right now, but I guess that will fix the problem. One last question if you dont mind. How come the creator of the code could compile the EA as it was written originally with 0 errors? Was that because it was (he made it in 2013 or earlier) before mql4 was upgraded? 
 
Erlend Christiansen #: How come the creator of the code could compile the EA as it was written originally with 0 errors? Was that because it was (he made it in 2013 or earlier) before mql4 was upgraded? 

Correct! Things have changed since then!

Reason: