You need a RefreshRates() in your timed loops.
Whether that fixes your problem or not, I don't know. in fact, I don't know what your problem is.
What is your problem other than "but it didn’t work as expected " ?
Whether that fixes your problem or not, I don't know. in fact, I don't know what your problem is.
What is your problem other than "but it didn’t work as expected " ?
You need a RefreshRates() in your timed loops.
Whether that fixes your problem or not, I don't know. in fact, I don't know what your problem is.
What is your problem other than "but it didn’t work as expected " ?
Thanks Phy, I will give the RefreshRates() a try but not sure if that is the issue.
Did you not read my text under the code? This text explains my problem.
No, it doesn't explain to me what you consider the problem.
Assuming you are buying to close the order, your max price is 1.4599+5 (slippage) = 1.4604, and the current quote was 1.4605
Assuming you are buying to close the order, your max price is 1.4599+5 (slippage) = 1.4604, and the current quote was 1.4605
I don't know why, code "looks" ok, put in some debug statements to see where it goes next time.
Thanks for your input Phy and a second eye on the code. I will take your suggestion.
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
I’m not sure how to handle re-quotes. I have the following code but it didn’t work as expected in forward testing. Could someone help?
Thank you,
StrangeGuy
I received only one re-quote. The idea would be that I close at my ideal price. It should re-quote me at least (NumberOfTries) times until it reached my price (+/- Slippage). I wouldn’t want the EA to continue with this unresolved. Maybe loop?
2008.01.22 13:15:59 'x': requote 1.4603 / 1.4605 for order #xxxxx114 sell 1.00 EURUSDm closing at 1.4599
2008.01.22 13:15:57 'x': request was accepted by server
2008.01.22 13:15:50 'x': close order #xxxxx114 sell 1.00 EURUSDm at 1.4529 sl: 0.0000 tp: 0.0000 at price 1.4599