What's mean"Error opening BUY order : 133"?

 
11:38:21 try_1min EURUSD,M1: Error opening BUY order : 133
11:38:53 try_1min EURUSD,M1: Error opening SELL order : 133
11:40:07 try_1min EURUSD,M1: Error opening BUY order : 133
11:40:31 try_1min EURUSD,M1: Error opening BUY order : 133
11:43:40 try_1min EURUSD,M1: Error opening SELL order : 133
11:47:16 try_1min EURUSD,M1: Error opening BUY order : 133
11:47:20 try_1min EURUSD,M1: Error opening BUY order : 133
What's mean"Error opening BUY order : 133"? Thanks.
 
tiger3



ERR_TRADE_DISABLED 133 Trade is disabled.
 
double TakeProfit = 80;
double TrailingStop = 50;
int ExtPeriod=8;
double ExtBuffer;
double preExtBuffer;
int Lots=1;
double level_low=23,level_high=77;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
int cnt, ticket, total;
if(Bars<100)
{
Print("bars less than 100");
return(0);
}
if(TakeProfit<10)
{
Print("TakeProfit less than 10");
return(0); // check TakeProfit
}
// to simplify the coding and speed up access
// data are put into internal variables

ExtBuffer=100+iWPR(NULL,0,ExtPeriod,0);
preExtBuffer=100+iWPR(NULL,0,ExtPeriod,1);

total=OrdersTotal();

if(total<1)
{
// no opened orders identified
if(AccountFreeMargin()<(1000*Lots))
{
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
// check for long position (BUY) possibility

if(preExtBuffer<level_low && ExtBuffer>=level_low) // buy condition
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-TrailingStop*Point,Ask+TakeProfit*Point, "macd sample",16384,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ",GetLastError());
return(0);
}
// check for short position (SELL) possibility
if(preExtBuffer<level_high && ExtBuffer>=level_high) // sell condition

{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+Point*TrailingStop,Bid-TakeProfit*Point, "macd sample",16384,0,Aqua);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
}
return(0);
}
// it is important to enter the market correctly,
// but it is more important to exit it correctly...
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && // check for opened position
OrderSymbol()==Symbol()) // check for symbol
{
if(OrderType()==OP_BUY) // long position is opened
{
// should it be closed?
if(preExtBuffer<level_high && ExtBuffer>=level_high) //buy close
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Red); // close position
return(0); // exit
}
// check for trailing stop
if(TrailingStop>0)
{
if(Bid-OrderOpenPrice()>Point*TrailingStop)
{
if(OrderStopLoss()<Bid-Point*TrailingStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(), 0,Yellow);
return(0);
}
}
}
}
else // go to short position
{
// should it be closed?
if(preExtBuffer>level_low && ExtBuffer<=level_low) //sell close
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Aqua); // close position
return(0); // exit
}
// check for trailing stop
if(TrailingStop>0)
{
if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
{
if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0))
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(), 0,Blue);
return(0);
}
}
}
}
}
}
return(0);
}
// the end. Please check for me. Thanks
 
00:03:22 '303313': trading by experts is prohibited
00:03:22 '303313': trading by experts is prohibited
00:03:37 '303313': trading by experts is prohibited
00:03:37 '303313': trading by experts is prohibited
00:08:17 '303313': trading by experts is prohibited
 
tiger3, your broker forbid trading operations by expert advisor
 
thanks
Reason: