Optimising Trading times

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33754 quote
    kg6450
    Participant
    Average

    Hi all, I am currently backtesting a strategy to see between which hours of the day are the best to run it. At the moment all I can do is test it manually for different time intervals using DEFPARAM FLATBEFORE and DEFPARAM FLATAFTER but this is taking extremely long to go through everything.

    Does anyone know of a way to optimise for different hours of the day?

    Thanks in advance!

    #33761 quote
    Eric
    Participant
    Master
    #33768 quote
    StantonR
    Participant
    Senior

    Have you tried setting variables for the timeframes not even sure if it works would have to test it out.

    DEFPARAM FLATBEFORE = a

    DEFPARAM FLATAFTER = b

    starting point a 08000  end point a 23000  interval 1000

    do same with b.

    Not even sure this works just a theory

    #33773 quote
    Maz
    Participant
    Veteran

    @StantonR Yes, that works, I do that – t not using flatbefore and flatafter but by using:

    tradingTime = time > startTime and time < endTime
    
    if tradingTime then
      ...
    else
     ...
    endif
    #33889 quote
    kg6450
    Participant
    Average

    Thanks for the response, Yeah I was thinking that too, the only issue is is optimising within those hours, since there are only 60 minutes within an  hour but the optimisation will iterate through until the next thousand

    #33984 quote
    GraHal
    Participant
    Master

    Ive done it before using, for example, 080000 to 130000 with interval 001500 (15 mins) but ignore results for those times that don’t make sense, e.g. 0975000.

    Hope that makes sense 🙂

    GraHal

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

Optimising Trading times


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
kg6450 @kg6450 Participant
Summary

This topic contains 5 replies,
has 5 voices, and was last updated by GraHal
8 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/27/2017
Status: Active
Attachments: No files
Logo Logo
Loading...