Do you normalize price?
Hello roger,
what do you mean by "normalize"
is it for example 1.36252525 --> 1.36250000 if that's, I do with a personnal function, maybe it exists one furnish
but i find what doesn't work, it was because I use OP_SELL and not OP_SELLLIMIT :-))
Now, I have another error : 138
2008.12.05 07:39 dev4 EURUSD,M15: OrderClose error 138
means in doc --> REQUOTE !!!
Do you have an idea on this term
thanks
chris
I mean if you don't use Ask and Bid but calculate your price, you have to normalize it:
price=NormalizeDouble(price,4); //or 2 if JPY.
I mean if you don't use Ask and Bid but calculate your price, you have to normalize it:
price=NormalizeDouble(price,4); //or 2 if JPY.
thanks Roger
Effectively, I made a function for it; Even I use NormalizeDouble, I always have the same error...
It's only the stop that dosen't work because, when I trap it, the order is send.
Maybe, does the stop must be far from the price?
chris
hi...
i am struggling with the same error ( OrderClose error 138.) i have normalized the price... and i placed a RefreshRates also... plaese if you have some idea how to fix it... thanks.
if (OrderLots() ==lots) { if (Ask-OrderOpenPrice() >= 10*Point) { RefreshRates(); OrderClose (OrderTicket(),lots/2,Ask,2,White); return(0); } }
thank you so much Ais! it worked perfectly fine!
just one question now: all code i've been studying uses Ask price for closing an order... this is the first time i saw the use of "OrderClosePrice ()" in place of Ask... is this a bug of mql4?
thank you so much again, my friend!
This is just a feature.
This is just a feature.
thanks again....

- 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 send an order and I have always the error 129 or 4107 (error price) then my price is 30 pips under the close...??
thanks for your comments
Chris