Backtest in timeframes smaller than 1 day not working

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #115070 quote
    EG
    Participant
    Junior

    Hi. My backtests are only working in timeframes of 1 day or more. Timeframes smaller than 1 day (e.g. 4 hours, 30 minutes etc) I am trying to run backtests but it doesnt work, no trades are entered. I believe it is not related to the conditions as I am using very simple conditions that work on all timeframes, except if smaller than 1 day. I am using the complete subscripti0n so I think that can not be the problem Anyone facing the same problem? Would be great to get some help here, assume I need to adust some settings?

    thanks.

    #115071 quote
    Nicolas
    Keymaster
    Master

    Sounds highly related to date or time conditions somewhere? No code, no full and quick support 😉

    #115073 quote
    EG
    Participant
    Junior

    Thanks for your quick response. For example see below very simple code. works on 1 day, 2 day ,1 week etcetera. But if I change the chart to 4 hour, 2 hour and backtest again it wont capture any trade. Any idea what I should adjust? Many thanks!

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Conditions to enter long positions
    indicator1 = ExponentialAverage[14](close)
    c1 = (close CROSSES OVER indicator1)
    
    IF c1 THEN
    BUY 1 SHARES AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    indicator2 = Average[20](close)
    indicator3 = Average[50](close)
    c2 = (indicator2 CROSSES UNDER indicator3)
    
    IF c2 THEN
    SELL AT MARKET
    ENDIF
    #115076 quote
    Nicolas
    Keymaster
    Master

    What platform version, and instrument please?

    #115078 quote
    EG
    Participant
    Junior

    Porealtime complete V11.1, instrument ticker ZS0120 (soybeans jan).

    #115091 quote
    J.
    Participant
    Average

    Have you tried loading more units to backtest for a longer period of time? Maybe your conditions are never met in the timescale you’re trying to backtest.

    Nicolas thanked this post
    #115092 quote
    EG
    Participant
    Junior

    Yes I tried on several instruments, using the max amount of units on the 6 or 4 hours (15K units). conditions are met often. Therefore thought maybe its related to my settings or maybe even to my subscription? If you have any insights on this I would be really happy as it really stops me to progress at the moment.

    #115094 quote
    EG
    Participant
    Junior

    Hi Nicolas, Just understand from prorealtime that its a technical issue in version 11 which they are trying to resolve. For now will go back to use version 10.3 untill it is resolved. Thanks for your suggestions.

    Nicolas thanked this post
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

Backtest in timeframes smaller than 1 day not working


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
EG @erjen_groen Participant
Summary

This topic contains 7 replies,
has 3 voices, and was last updated by EG
6 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/17/2019
Status: Active
Attachments: No files
Logo Logo
Loading...