How to know requote new price.

 

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,

 

Hello,

I don't believe no one has the solution.

Please help me.

I'm waiting.

Thanks in advance.

 
Use the function RefreshRates().
 
Roger wrote >>
Use the function RefreshRates().

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.
 
spockman wrote >>

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.

 
This has been bothering me as well. As kyara said, the log specifically shows the requote price. It might or might not be the same price as the price you would get via refreshrates immediately after receiving the requote. I would like to retry the order with the requote price and not with the latest price via refreshrates... So can this be done? Is there any way of accessing the requote price as shown in the log?
 
kyara:

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,

You should check your use of RefreshRates() and your loop for placing the order..... as you seem to be trying to place the same value with OrderSend (Bid) every time despite the requote error.. or....


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.
 
gordon:
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.



tic = -1;
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);
}
 
n8937g:

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


tic = -1;
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...

Reason: