luisneves:
I think the best way to diagnose this is to re-run your test with modified code that prints all the relevant values to the log so you can see what is going on. So when the original trade is opened print, Bid, Ask, OrderOpenPrice(), etc. when you place the opposite order print Bid, Ask, OrderOpenPrice(), OrderClosePrice() for the current order and then OrderOpenPrice() for the opposite order as well as OppositeDistance all to a precision of Digits for doubles. Then when it goes wrong you can diagnose why . . . anything else is just guessing, even if I guess correctly you still need to know for sure what is wrong.
Hi all,
I have one issue with an ea regarding open orders. I'm looking to open opposite orders apart of an opposite distance from an existing one.
Some times it opens at right distance, others at a distance above and others even a distance below.
While I can understand that sometimes it could open at a distance above I can't understand why can it opens below.
I thought that could happen because of spread, but I've done a test with a spread control and the problem maintains.
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 all,
I have one issue with an ea regarding open orders. I'm looking to open opposite orders apart of an opposite distance from an existing one.
Some times it opens at right distance, others at a distance above and others even a distance below.
While I can understand that sometimes it could open at a distance above I can't understand why can it opens below.
I thought that could happen because of spread, but I've done a test with a spread control and the problem maintains.
Could I ask you to take a look to the code and show me where I'm wrong ?
Thank you in advance for time spent
Best Regards
Luis