avatar
Alert Profit

MarketBuler 22 4th Sep, 2020

CPP 0.61 KB
                                           
                         double Profit = OrderProfit ()
                        + OrderCommission ()
                        + OrderSwap (); 
void OnTick()
  {
   Profit ();
  }
//+------------------------------------------------------------------+
void Profit ()
{

   for(int pf=OrdersTotal()-1;pf>=0;pf--)
     {
      if(OrderSelect(pf,SELECT_BY_POS,MODE_TRADES))
      if(OrderSymbol()==Symbol())
      if(OrderType()==OP_BUY)
      if(OrderType()==OP_SELL)
      if(Profit>1)
      {
         Comment("Hey you got $1"); PlaySound("\\Files\\you-got-it-2.wav");
      }
     }
}
                      
                                       
To share this paste please copy this url and send to your friends
RAW Paste Data

Comments

Authentication required

You must log in to post a comment.

Log in
    There are no comments yet.