ViewOrdersProfit





#property indicator_chart_window
extern double Lot = 0.1;
int start()
  {
   int i,l1,l2;
   double profit;
   string st;   
   st="Ïðèáûëü/óáûòîê ïî îòêðûòûì îðäåðàì èç ðàñ÷åòà çà "+DoubleToStr(Lot,1)+" ëîò:\n";
   for(i=0;i<OrdersTotal();i++)
   {
      OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
      if(OrderType()==OP_BUY || OrderType()==OP_SELL)
      {
         st=st+OrderTicket()+" - "+OrderSymbol()+" - ";
         if(OrderType()==OP_BUY) st=st+"BUY = "; else st=st+"SELL = ";
         l1=Lot/0.1; l2=OrderLots()/0.1;
         profit=OrderProfit()/l2*l1;
         st=st+DoubleToStr(profit,2)+"\n";
      }
   }
   Comment(st);
   return(0);
  }






Sample





Analysis



Market Information Used:



Indicator Curves created:


Indicators Used:



Custom Indicators Used:

Order Management characteristics:
Checks for the total of open orders


Other Features: