//+------------------------------------------------------------------+ //| TradesInfo.mq4 | //| John Taylor | //| http://www.noone.net | //+------------------------------------------------------------------+ #property copyright "John Taylor" #property link "http://www.noone.net" #property show_inputs #include extern string symbol = "ALL"; string scriptName = "TradesInfo"; int start() { double profit,swap,commission,slippage; for(int pos=OrdersHistoryTotal()-1;pos>=0;pos--) { if(!OrderSelect(pos,SELECT_BY_POS,MODE_HISTORY)) { Print("OrderSelect failed - ",ErrorDescription(GetLastError())); } else { if(symbol=="ALL" || symbol =="" || OrderSymbol()== Symbol()) { double thisProfit=OrderProfit(); if(OrderComment()=="Deposit") continue; if(MathAbs(OrderStopLoss()-OrderClosePrice())