[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. - page 533
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
Dear, I am testing an EA in the tester and the log shows error 138. I mean, the tester generates requotes? I suspect I have an error somewhere in this part of the code
If you really have an error, please advise me what is wrong?Probably the wrong price in OrderClose()
Probably incorrect price in OrderClose()
How do you check/correct?
Use the price valid at the time the request was sent to the server.
Use the valid price at the time the request is sent to the server.
How can I check/correct ?
Actually, there is a branch of psychics waiting for this question. It's not clear from your code what kind of order you are closing.
Is it OP_BUY ?
OrderSymbol() is the same as Symbol() ?
Don't I get a valid price with RefreshRates?
You do if RefreshRates() returns true.
The only question is: "is the Bid the price at which the order can be closed?"
Actually, the psychic branch is waiting for this question. It is not clear from your code what order you are closing.
Is it OP_BUY ?
OrderSymbol() is the same as Symbol() ?
OrderSymbol() is equal to Symbol()
I close all open orders both longs and shorts.
You do if RefreshRates() returns true.
The only question is: "is Bid the price at which the order can be closed?"
I.e. to separate the closing of longs and shorts?
OrderSymbol() is the same as Symbol()
I close all open orders, both longs and shorts.
What are the other shorts at Bid price ?
Only orders of OP_BUY type can be closed by Bid
what other shorts at Bid price ?
Only orders of type OP_BUY can be closed at Bid
OrderSymbol() is the same as Symbol()
I close all open orders both longs and shorts.
I.e. separate the closing of longs and shorts?