//+------------------------------------------------------------------------------------------------------------------+
//+ [Knowledge of the ancients]                           \!/                             [!!!-MT4 X-CHICKEN SWITCH] +
//+                                                      (ò ó)                                     [Update-20181007] +
//+-------------------------------------------------o0o---(_)---o0o--------------------------------------------------+
#property copyright "Welcome to the World of Forex"
#property description "Let light shine out of darkness and illuminate your world"
#property description "and with this freedom leave behind your cave of denial"
#include <stdlib.mqh>
#include <WinUser32.mqh>
   int option=0; string display="";
//+------------------------------------------------------------------------------------------------------------------+
   int start() {CloseAll(); display=""; 
   display=StringConcatenate(display,"\n\n\n\n                            XARD CHICKEN SWITCH HIT :-)");  
   Comment(display); return(0);}
//+------------------------------------------------------------------------------------------------------------------+
   int CloseAll(){int total=OrdersTotal(),cnt=0; switch (option){case 0: 
   for(cnt=total; cnt>=0; cnt--){ OrderSelect(0,SELECT_BY_POS,MODE_TRADES);
   if(OrderType()==OP_BUY ) OrderClose(OrderTicket(),OrderLots(),Bid,5,Violet);
   if(OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,5,Violet);
   if(OrderType()> OP_SELL) OrderDelete(OrderTicket());} break;}}
//+----END OF FILE---------------------------------------------------------------------------------------------------+