Backtesting trading hours

Forums ProRealTime English forum ProBuilder support Backtesting trading hours

Viewing 4 posts - 1 through 4 (of 4 total)
  • #217266

    Hello

    I’m sure someone here can help me ;>)

    I want to backtest if I  run the script certain hours, e.i. trading hours 03.00-23.00.

    More specific I’m interested to know when it is optimal to close all trades between 22.00-2300 and start script 02.00-05.00 in 10 minutes intervals.

     

    #217270

    when it is optimal

    Use the optimiser on Time … min 000000 max 2350000 step 001000.

    I mostly find optimal for Hour to be Hour > 9 and Hour < 21.

    If you want to avoid overnight charges then close all trades before 9pm uk time.

    #217549

    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.

    #217554

    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 < …

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login