I have found the ProRealTime optimizer to be quite buggy on FLATAFTER time aswell as genereal time conditions. Also, when optimizing a variable e.g. time from 220000 to 230000 with a step size of 1000, ProRealTime will also test time values that don’t exist e.g. 226000, 227000, 228000, and so on which will take unnecessary execution time.
I prefer actually writing it as a long IF-statement. Takes more time to write the code, but seems more reliable.
See example below where you optimize the variable a with a stepsize of 1.
I would not do it like that, because it is not said that your code will be called when nothing happened in the previous bar (no ticks). For 21:59:59 (Amsterdam) that would be unlikely but with 22:10 …
So I would code it as > … and < …
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue