Hello,
I don't believe no one has the solution.
Please help me.
I'm waiting.
Thanks in advance.
Some brokers provide wrong Ask/Bid price even right after RefreshRates()...
im using this way to retrieve the ask/bid values. it fixed me some error notices, and let the script to sending the order...
RefreshRates(); Xask = MarketInfo("EURUSD",MODE_ASK); res = OrderSend("EURUSD",OP_BUY,vol1,Xask,Slippage,0,0,NULL,MAGIC1,0,Green);hope it helps.
im using this way to retrieve the ask/bid values. it fixed me some error notices, and let the script to sending the order...
hope it helps.
Thank you.
I'm doing exactly same thing as you (looping with sleep command when error).
But I get requote error many times like this;
23:53:05 'ID' : intant order sell 0.10 USDCAD at 1.0737 sl: 0.0000 tp: 0.0000
23:53:06 'ID': request was accepted by server
23:53:06 'ID': requote 1.0724 / 1.0729 for open sell 0.10 USDCAD at 1.0737 sl: 0.0000 tp: 0.0000
23:53:07 'ID': instant order sell 0.10 USDCAD at 1.0737 sl: 0.0000 tp: 0.0000
23:53:07 'ID': request was accepted by server
23:53:08 'ID': requote 1.0724 / 1.0729 for open sell 0.10 USDCAD at 1.0737 sl: 0.0000 tp: 0.0000
23:53:09 'ID': instant order sell 0.10 USDCAD at 1.0737 sl: 0.0000 tp: 0.0000
23:53:09 'ID': request was accepted by server
23:53:10 'ID': requote 1.0724 / 1.0729 for open sell 0.10 USDCAD at 1.0737 sl: 0.0000 tp: 0.0000
23:53:11 'ID': instant order sell 0.10 USDCAD at 1.0737 sl: 0.0000 tp: 0.0000
23:53:11 'ID': request was accepted by server
23:53:13 'ID': requote 1.0724 / 1.0729 for open sell 0.10 USDCAD at 1.0737 sl: 0.0000 tp: 0.0000
.
.
.
Is it a bug of MT4?
Please help me.
Hello,
I want to know requote new price when error 138 occured.
Because some brokers provide wrong Ask/Bid price even right after RefreshRates(),
and I get requote error continuously.
I noticed that error messages on logs have new price.
2009.09.30 15:55:25 'account': requote 1.0803 / 1.0808 for order #2083967214 buy 0.10 USDCAD closing at 1.0808
I want to know "requote 1.0803 / 1.0808" values from MQL4 EAs or Scripts.
Is there any way to get it?
Thanks,
Could be a greedy broker using "Boston Tech" or maybe you should increase slip....What would you do with it.... if you retrieved the requote value??
Long Live MT4....NOT MT5
If I can read the requote value I would retry to place the order at the requote values and NOT at the current value fetched via refreshrates. My theory is that this value is more likely to be accepted since this is the value the broker suggested. It's only a theory though, one which I cannot check since I can't access that value. Bottom line is at the moment on requotes I retry placing/closing the order at the latest available price, but I would still like to access the requote price and try that price for the retry to see if it works better.
I think you may be trying to put a cast on a broken fingernail... Clearly your Ordersend() is not changed from order to reorder....and the value of the currency hasn't changed...is your Bid value stuck??
why don't you make a loop....and it will keep trying with new data until tic is true...after it's true....then it will execute "else"..... after else is true too then back to return(0).... waiting for whatever happens next.
if (whatever your qualifying things are.....)
{
while((tic == -1)&&as long as this is true too)
{
tic = OrderSend(Symbol(),OP_SELL,LE30, NormalizeDouble((Bid),4),5,Bid+sl1*Point,0,"",255,0,CLR_NONE);
}
if (tic!= -1)
{
count=31;
tic= -1;
}
else
{
return(0);
}
while((tic == -1)&&as long as this is true too))
{
tic = OrderSend(Symbol(),OP_BUY,LE0, NormalizeDouble((Ask),4),5,Ask-sl0*Point,Ask+tp000*Point,"",255,0,CLR_NONE);
}
return(0);
}
I think you may be trying to put a cast on a broken fingernail... Clearly your Ordersend() is not changed from order to reorder....and the value of the currency hasn't changed...is your Bid value stuck??
why don't you make a loop....and it will keep trying with new data until tic is true...after it's true....then it will execute "else"..... after else is true too then back to return(0).... waiting for whatever happens next
if (whatever your qualifying things are.....)
{
while((tic == -1)&&as long as this is true too)
{
tic = OrderSend(Symbol(),OP_SELL,LE30, NormalizeDouble((Bid),4),5,Bid+sl1*Point,0,"",255,0,CLR_NONE);
}
if (tic!= -1)
{
count=31;
tic= -1;
}
else
{
return(0);
}
while((tic == -1)&&as long as this is true too))
{
tic = OrderSend(Symbol(),OP_BUY,LE0, NormalizeDouble((Ask),4),5,Ask-sl0*Point,Ask+tp000*Point,"",255,0,CLR_NONE);
}
return(0);
}
Actually not knowing / seeing your code...you may not even need the ""else" stuff at all...but the loop is still what you need as the program will(try) to place the order until it takes....at whatever value conditions you set...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I want to know requote new price when error 138 occured.
Because some brokers provide wrong Ask/Bid price even right after RefreshRates(),
and I get requote error continuously.
I noticed that error messages on logs have new price.
2009.09.30 15:55:25 'account': requote 1.0803 / 1.0808 for order #2083967214 buy 0.10 USDCAD closing at 1.0808
I want to know "requote 1.0803 / 1.0808" values from MQL4 EAs or Scripts.
Is there any way to get it?
Thanks,