Am sorry if there's a thread out there with this question but I couldn't find it myself so here goes.
How do I write code to enter at an exact price without sending pending orders. I would like to share my code but unfortunately it's proprietary so I can't.
Am sure that the code isn't needed though since this is just a general use scenario.
- Coding help
- How can I have a pending order execute at an exact price without the spread difference?
- [ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4.
You can't, even with pending orders. The market does not change by just a point. And there can be slippage.
If the market has reached or exceeded your entry price, enter. You are overthinking it.
William Roeder #:
Thanks for the reply.You can't, even with pending orders. The market does not change by just a point. And there can be slippage.
If the market has reached or exceeded your entry price, enter. You are overthinking it.
I understand that I don't mean "exact" exact ,that's impossible, much less in the strategy tester .
I'm just saying for example to enter when price breaks the high of a certain candle, how would such code look like. Actually lemme try to hide as much code as I can and put the code I'm trying below. Ofcourse that code doesn't work at all but just for context I always get the first Alert, but never the second.
Is the problem that mqltick doesn't work in strategy tester or???
Files:
m.mq5
2 kb

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