//+------------------------------------------------------------------+ //| CloseTrades.mq4 | //| Copyright © 2006, iExpertAdvisor, LLC | //| http://www.iExpertAdvisor.com | //+------------------------------------------------------------------+ #property copyright "Copyright © 2006, iExpertAdvisor, LLC" #property link "http://www.iExpertAdvisor.com" #include int init() { fnCloseTrades(); return(0); } int start() { fnCloseTrades(); return(0); } int fnCloseTrades() { int total=OrdersTotal(); double mySpread, myPrice; int type=0; bool stat; for( int cnt=0;cnt