- OrderSend Problem
- Error 130 - invalid stop. Why?
- [Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2.
Hi,
UPDATE!!!
using a OIL chart (ODL demo account) is works, I'm assuming that is something wrong with MetaQuotes demo Servers.
Anyone was this problem?
SB
Hi,
Hi,
I have the same problem since 2 days starting from last sunday when market has been reopened.
I am using 2 MIG live account and 1 demo account. I use to fine tune my expert advisors on a demo account, before I put them to go live.
All my expert advisors initialized and works fine on live account, but on demo account since last sunday, when market has been reopened I am facing with the problem that expert advisors are not working at all, however expert advisors with the same setup works fine on a live account.
I have been contacted to MIG phone support some minutes ago, but they said the system work fine. Just right after I have checked MQL4 community forum on the Internet and I saw many claim and questions with the same problem.
After that I just made a very simple EA using one single OrderSend() function.
//+------------------------------------------------------------------+
int Slip=10;
int flag;
double Lots=0.1;
double SL;
double TP;
int init()
{
return(0);
}
int deinit()
{
return(0);
}
int start()
{
SL=Ask-200*Point;
TP=Ask+200*Point;
flag=OrderSend(Symbol(),OP_BUY,0.1,Ask,Slip,SL,TP,"test",0,0,Green);
if(flag==-1) Print("error code: ",GetLastError());
return(0);
}
//+------------------------------------------------------------------+
The facts:
- EA with predefined stoploss and takeprofit is not working on demo account, but it works on live account.
- EA used on demo account comes back with error code 130, "invalid stops", but 100% sure stoploss is not invalid and why woks fine when go live.
After that I just modified the stoploss and takeprofit to zero and work well on demo and live too.
//+------------------------------------------------------------------+
int Slip=10;
int flag;
double Lots=0.1;
double SL;
double TP;
int init()
{
return(0);
}
int deinit()
{
return(0);
}
int start()
{
SL=0;
TP=0;
flag=OrderSend(Symbol(),OP_BUY,0.1,Ask,Slip,SL,TP,"test",0,0,Green);
if(flag==-1) Print("error code: ",GetLastError());
return(0);
}
//+------------------------------------------------------------------+
- EA without stoploss and takeprofit is working on demo account and on live account too.
valnor
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use