This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 25th, 2011  |  syntax: None  |  size: 1.30 KB  |  views: 187  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /*
  2.    Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
  3.    Website: http://purebeam.biz
  4.    E-mail : purebeam@gmail.com
  5. */
  6. #property copyright "Intellectual Property Heidi Harvey"
  7. #property link      "stevemauro@verizon.net"
  8.  
  9. int start() {
  10.    int l_cmd_0;
  11.    bool li_4;
  12.    int l_ord_total_8 = OrdersTotal();
  13.    if(l_ord_total_8 == 0)
  14.       Alert("No orders present to close") ;
  15.    else
  16.    {
  17.       for (int l_pos_12 = l_ord_total_8 - 1; l_pos_12 >= 0; l_pos_12--) {
  18.          OrderSelect(l_pos_12, SELECT_BY_POS);
  19.          l_cmd_0 = OrderType();
  20.          li_4 = FALSE;
  21.          switch (l_cmd_0) {
  22.          case OP_BUY:
  23.             li_4 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red);
  24.             break;
  25.          case OP_SELL:
  26.             li_4 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Lime);
  27.             break;
  28.          case OP_BUYLIMIT:
  29.          case OP_BUYSTOP:
  30.          case OP_SELLLIMIT:
  31.          case OP_SELLSTOP:
  32.             li_4 = OrderDelete(OrderTicket());
  33.          }
  34.          if (li_4 == FALSE) {
  35.             Alert("Order ", OrderTicket(), " failed to close. Error:", GetLastError());
  36.             Sleep(3000);
  37.          }
  38.          else
  39.              PlaySound("ok.wav") ;
  40.       }
  41.    
  42.    }
  43.    return (0);
  44. }
clone this paste RAW Paste Data