Grail_Brotherhood

Profit factor:
0.00
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
0 Views
0 Downloads
0 Favorites
Grail_Brotherhood
extern double  lots    = 1;

extern int TP_1__BUY   = 2222,  
           SL_1__BUY   = 222;   

extern string P_Performanc= "-- Parameters for Trades --";

extern int TP_2__SELL  = 1111,
           SL_2__SELL  = 111;

int        last_bar    = 0;

int start()
{
double StopLevel =MarketInfo(Symbol(),MODE_STOPLEVEL);  // òåêóùèé óðîâåíü ñòîïîâ  

   if (last_bar == Bars) return(0);
   last_bar = Bars;
   if (OrdersTotal() == 0)
   {
OrderSend(Symbol(),OP_BUY,lots,Ask,3,Bid-SL_1__BUY*Point,Ask+TP_1__BUY*Point);
OrderSend(Symbol(),OP_SELL,lots,Bid,3,Ask+SL_2__SELL*Point,Bid-TP_2__SELL*Point);
   } 
   return(0);
}

Comments