Disliked
{quote} Hi, This is the best I can get and your figures made no difference but I appreciate you trying to help, the pictures are from strategy tester visual, its not great where it is trading from and it may be the spread, who knows, try it yourself I will attach it try if you like or bin it, I am interested in perfection only when I can get it. I've only been coding for about 11 years but I've been in software all my life, daft things like this bug me. Regards Geoff Hornibrook {file} {image} {image}
I hear you, this happens all the time. You've coded such a an elaborate project and it's the little things that you somehow can't figure out. DRIVES ME NUTS lol
Anyways, I don't have MT4 so unfortunately I can't test it, but I do see that you have now added the DistancePips complexity back, which does change things.
However, I can't figure out why this doesn't work anyways. It should
in theory. You can try debugging this specific time-period and seeing why it's entering where it's not suppose to. What condition is being met here. Logging is terrible in MQL4/5 but it's the only option left. For instance, you might see that there's an error at this specific moment like (Market Closed) which is common on MT5 and that's why you get a "delayed" entry. Or some other "feature" of this wonderland
Or hopefully other people can figure out what's wrong and give you an appropriate solution. Best of luck