Trading Time optimisation

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

    Hi,

    Has anyone already built a piece of code to optimise trading time ?

    I currently use TIMEFROM = 080000 and TIMETO = 170000 to define my trading hours.

    Is there anyway to back test with optimisation of trading hours to get the best time to trade?

    Thks,

    B.

    gfx

    #175067 quote
    robertogozzi
    Moderator
    Master

    Set optimization for each time from, say, 060000 to 100000 step 010000 (1 hour) or 003000 (half an hour) or 000100 (1 minute).

    Always write 6 digits, don’t mind if leading 0s are later dropped.

    thanked this post
    #175069 quote
    gfx
    Participant
    Average

    Thks !

    #241958 quote
    Suffi
    Participant
    Junior

    @ robertogozzi

    it’s an old post, but here again the question of how to optimise times?
    the suggestion from die doesn’t seem to work, as no leading zeros can be entered.

    greet

    Suffi

    #241959 quote
    robertogozzi
    Moderator
    Master

    Don’t worry, leading 0s are always dropped, you enter 001000 (10 minutes), they are then converted into number 1000, It’s OK.
    Of course if you set a 003000 minute step, from 080000 to 200000, it will optimize 080000, 083000, 086000, 089000, then 092000, etc… which is not correct!
    Use always 010000 hour steps, or 000100 1-minute steps, but in this case many optimization steps will have to be ignored.
    It can’t be accurate as maths with dates and times are not supported.

    Suffi thanked this post
    #242121 quote
    MaoRai54
    Participant
    Master

    Hi & Happy New Year,

    to optimise the trading hours in my systems I use this way:

    if  (condition) and (hour=>H1 and hour<=H2) then ………….

    where H1 and H2 are the optimised trading hours.

    You can also add the minutes in the same way (from 0 to 59)

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

Trading Time optimisation


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
gfx @gfx Participant
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by MaoRai54
1 year, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/10/2021
Status: Active
Attachments: No files
Logo Logo
Loading...