Help ! EA opens an endless amount of Orders? What to do? MT4
for(int i=OrdersTotal()-1 ; i>=0 ; i-- )
for(int Ordercount=0; Ordercount<=total; Ordercount++ )
to
for(int Ordercount=0; Ordercount<total; Ordercount++ )
although that doesn't affect the result
if (OrderCloseTime()==0........ //Not necessary as you are checking open orders if (OrderCloseTime()>0){ShortOrder--;} Again, you are checking open orders - No point to this check.
Count the long/short orders in your loop. Do not open another is there is already 1 open.
What can I do? The EA opens an endless Amount of Orders ( and shows "error 1"& "error 130") (important -> MT4)
Also interesting: Only 20 Buy Orders ...