Backtesting on 2 minutes – how to get more data?

Forums ProRealTime English forum ProOrder support Backtesting on 2 minutes – how to get more data?

Viewing 9 posts - 1 through 9 (of 9 total)
  • #91502

    Hello I am trying to backtest a 2 min strategy how can I get data from further back in time than the period shown on the screen,

     

    Thanks

     

    Dave Hall

    #91504

    Please update your country flag. Thank you.You can change dates as from attached pic.

     

    #91507

    If you want to go back beyond the 100k or 200k bars (the amount depends on your PRT platform type) then you can’t. You get the most recent 100k or 200k bars whether that is 100k times 2 minute candles or 100k times 1 day candles.

    #91508

    Thanks the trouble is using a 2min time frame it only lets me go back to 10th Jan even with 10,000 bars selected

    #91509

    Thanks that ‘s a bit of a shame as with 2min strategy I can’t get much meaningful data, I can get back as far as August 1 2018 but thats it

     

    #91514

    Unfortunately this is one of the disadvantages of back testing on faster time frames – the history available is very limited. All you can really do is create a strategy based on the data available and then forward test it by running it live in demo. Not ideal and a very slow way of testing but it is the only way unfortunately. The good news is that if it is curve fitted to the data sample you used then on a fast time frame it shouldn’t be too long before forward testing confirms this especially if it opens a lot of trades. You may have to include emergency get out of the market conditions in case of black swan moments that your back test was never developed on but that it might have to trade through one day in the future.

    Note: I changed your topic title to something a little more meaningful.

    1 user thanked author for this post.
    #91515

    Sorry one last question if  I want to set trading hours ie between 19:00 – 21:00 uk time is this possible to add to my code?

    #91516

    Yes you can use the following:

    These will not allow trading before 190000 and close all trades at 210000 and not allow any trades after that time.

    Alternatively you can just set a condition to allow or disallow trading:

    Most answers to coding questions and examples can be found here:

    https://www.prorealcode.com/prorealtime-documentation/

    #91519

    That,s great thanks very much

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

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