I have a scalping strategy that needs to enter the trade as soon as condition is meet, not after the bar closes. I used the granularity sample code and ran it in the back-tester and it didn't work as had thought that it would. While it wasn't always entering at the exact close of the bar, it was like always a minute after the primary bar and the chances that the moving averages crossing always one minute past the primary bar is pretty much 0%.
So what is an easy way to program a code that would allow me to enter a trade intrabar?
Also, I can't have spreads greater than one. My broker spread FXCM would average about 1 pip including the commission that they charge. How can I get around the 3-pips spreads that I been seeing when I run it in the simulator? I'm not 100% sure how they do it in the backtester, but I'm assuming that the spreads are handled the same way as the simulator.
Comment