Error code 138 is a requote - see here and here
Calculated or unnormalized price cannot be applied. If there has not been the requested open price in the price thread or it has not been normalized according to the amount of digits after decimal point, the error 129 (ERR_INVALID_PRICE) will be generated. If the requested open price is fully out of date, the error 138 (ERR_REQUOTE) will be generated independently on the slippage parameter. If the requested price is out of date, but present in the thread, the order will be opened at the current price and only if the current price lies within the range of price+-slippage.
Try RefreshRates() before doing your OrderSend
LastPrice+Step*Point*pt
is unlikely to be a valid price. Open a Buy at Ask and a Sell at Bid.
Good spot GumRai. I only looked as far as the first OrderSend.
GumRai:
is unlikely to be a valid price. Open a Buy at Ask and a Sell at Bid.
thank you for your correction GumRai..but i want to place order sell above order buy...any idea...??
is unlikely to be a valid price. Open a Buy at Ask and a Sell at Bid.
andy1979:
thank you for your correction GumRai..but i want to place order sell above order buy...any idea...??
Place a limit sell
thank you for your correction GumRai..but i want to place order sell above order buy...any idea...??
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi guys, im new in EA, im create EA but im having trouble with errors 138, and how do i put take profit by modify order from input because when i create modify order take profit the result still error 138, here my EA