Advertisement
Guest User

trol

a guest
Nov 12th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. //+------------------------------------------------------------------+
  2. //| KillAll.mq4 |
  3. //| forex.monkey@live.com |
  4. //| forex.monkey@live.com |
  5. //+------------------------------------------------------------------+
  6. #property copyright "CodeMonkey"
  7. #property link "forex.monkey@live.com"
  8.  
  9. //+------------------------------------------------------------------+
  10. //| script program start function |
  11. //+------------------------------------------------------------------+
  12. int start()
  13. {
  14. //----
  15. for(int x=OrdersTotal()-1;x>=0;x--){
  16. OrderSelect(x,SELECT_BY_POS,MODE_TRADES);
  17. if(OrderType()==OP_BUY || OrderType()==OP_SELL){
  18. OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),666,CLR_NONE);
  19. }else{OrderDelete(OrderTicket());}
  20. }
  21. //----
  22. return(0);
  23. }
  24. //+------------------------------------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement