Hi,
I am tring to run the following script on MT4 (build 196) and I get an error msg - "Invalid trade parameters".
Code:
//+------------------------------------------------------------------+
//| script "send pending order with expiration data" |
//+------------------------------------------------------------------+
int start()
{
int ticket,expiration;
double point;
//----
point=MarketInfo(Symbol(),MODE_POINT);
expiration=CurTime()+PERIOD_M1*5;
//----
while(true)
{
ticket=OrderSend(Symbol(),OP_SELLSTOP,1,Bid-20*point,3,Bid-10*point,0,"some comment",1234,expiration,Green);
if(ticket<=0) Print("Error = ",ErrorDescription(GetLastError()));
else { Print("ticket = ",ticket); break; }
//---- 10 seconds wait
Sleep(10000);
}
//----
return(0);
}
//+------------------------------------------------------------------+
I don't understand the problem .
Can someone help ?
10X !