I've got a couple of questions that I'm unable to find a clear answer on.
1) What is the best way to limit one intrabar entry PER BAR. At times the profit objective that is hard coded in will be hit, and it'll re-enter on the same bar because the conditions in OnBarUpdate() are still met. I thought of using a limit order for entry that would prevent this... but even then if price drops below the limit value it'll trigger again. Is there any way to do this when CalculateOnBarClose() is set to false?
2) For backtesting, intrabar entries are displayed incorrectly and shown on the NEXT bar after the correct entry bar had the method been called in realtime. Is this just a bug in NT? This is a HUGE pain in the ass, and basically makes all of the backtesting functionality in NT useless for intrabar entries if that's the case. And if there's a built in functionality for Question #1, then you could at least get accurate backtesting results within a standard deviation based on inside/outside bars.
3) The EXACT same code generated by the Wizard will not compile once the code has been unlocked. At first I thought it was a syntax error(s) on my part, but after checking and rechecking it seems that it generates the same types of errors (mostly missing }, {, 0, ;, and crap about initializing arrays). What I'd really like to do is take a lot of the code generated by the wizard and move it into a separate class and define it as a series of functions with polymorphisms so I can keep reusing my code across strategies, but at the moment I can't even get the same code generated by the wizard to compile, much less my own.
Any help is much appreciated. And apologies in advance if these issues are addressed in bold type somewhere in the manual that I missed
Comment