| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Script don't work - need help
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);
}
//+------------------------------------------------------------------+
Can someone help ? 10X ! |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help With EA that does not work | shorttermtrader | Metatrader 4 | 0 | 05-02-2007 01:55 PM |
| This Ea Really Work | sps8 | Expert Advisors - Metatrader 4 | 18 | 04-02-2007 08:30 PM |
| Help me!!!! Why this EA doesn't work???? | metastock | Expert Advisors - Metatrader 4 | 3 | 02-17-2007 05:31 AM |
| script that dont work | ser71 | Setup Questions | 1 | 01-30-2006 04:15 PM |
| How does this really work? | Ayo | Questions | 0 | 12-19-2005 02:30 PM |