trading by experts is prohibited

 

Dear friends:

When I run my simple EA, "2010.10.21 16:45:43 '1621166619': trading by experts is prohibited
" is printed in log. Can you help me to sovle it? Thank you very in advance.

My EA code is the following:


//---- input parameters
extern double MyLots=0.1;
extern double MyTakeProfit=100.0;
extern double MyStopLoss=100.0;

int OrderSentTimes = 0;

int start()
{
//----
int ticket = 0;

if(Bars<50)
{
Alert("bars less than 50");
return(0);
}
else
{
Alert("bars more than 50");

}
while(OrderSentTimes < 3)
{
Sleep(1000);
Alert("Order sent times = ", OrderSentTimes);
OrderSentTimes++;
ticket=OrderSend(Symbol(),OP_BUY,MyLots,Ask,3,0,Ask+MyTakeProfit*Point,"Hello James",16384,0,Green);
Sleep(2000);
}
//----
return(0);
}
//+----

 

Seems that Your broker does not allow to trade with Expert Advisors. Maybe in customer agreement You will find a detailed info about it.

You got only one username/password for this account? Some brokers provides two or more logins with different credentials. (E.g. investor login what allows nothing, just You can see the History and the open trades)

Ernesto