I cant set the time Format in the optimisation

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #254488 quote
    pdrh
    Participant
    Average

    I want to make my entry time a variable and tried this as advised by Grahal in a reply to a post some time back .

    “Yes I do it often.

    Set in the Optimiser min = 000000, max = 230000, step = 010000.

    Above will (quickly) give you the optimised hour then narrow it down as, for example … 140000, 150000, 000500 to get to optimised 5 minutes.

    Flat Before / Flat After can’t be optimised.”

    However  my minimum setting keeps getting changed to 0 and the step to 10000,

    I cant bring up a dropdown to select Integer or decimal

    Cheers

    #254489 quote
    PeterSt
    Participant
    Master

    As far as I recall “optimising” with time is not possible. However, reading your post, I would try to do this :

    Use for all a factor of [whatever is required] larger, and in the code divide it again.
    I do such things with dates too (or else *that* can not be used in optimisation).

    It is a bit of trialing how the outcome becomes useful and you can use Graph for that. –> You really must because else you don’t know or can’t be sure what the program is working with.

    I hope you can get it to work. Back at the time when I tried it quickly, I gave up on it. 🙁

     

    PS: Or GraHal comes back to you. 🙂

    pdrh thanked this post
    #254492 quote
    GraHal
    Participant
    Master

    changed to 0 and the step to 10000

    Yes I get that also, but it still optimises from Midnight in 1 hour steps.

    pdrh thanked this post
    #254499 quote
    Iván González
    Moderator
    Master

    Hi! Have you tried optimizing like this?

    // startHour is the variable from the optimizer (0 to 23)
    myStartTime = startHour * 10000

    Another option to optimize minutes would be this:

    //startMinute (min 0, max 55, step 5) 
    myStartTime = (startHour * 10000) + (startMinute * 100)
    pdrh thanked this post
    #254501 quote
    pdrh
    Participant
    Average

    I am trying this

    noentrybeforetime=100000-XY//093000 with optimisation Min sat -30000 ,Max 30000, step 10

    #254502 quote
    phoentzs
    Participant
    Master

    I don’t think “noentrybefore” works for optimization. Try this instead:

     

    if time >= mytime then…

     

    and then optimize mytime.

    pdrh thanked this post
    #254505 quote
    GraHal
    Participant
    Master

    I use:

    If Time >= XX AND Time <= YY Then

    But if all I want is ‘hours’ then I use below as there is then less steps / less time needed to optimise:

    If Hour >= XX AND Hour <= YY Then ( 0 = min, 23 = max, step = 1)

    Optimising both XX and YY together is only 529 combinations for the ‘1 hour opti’.

    pdrh thanked this post
    #254517 quote
    pdrh
    Participant
    Average

    It did work . Optimised value was 7010

    GraHal thanked this post
    #254518 quote
    GraHal
    Participant
    Master

    So what are entering that as in your code?

    7010 looks like an ‘unworkable value’?  Accepting that the leading 00 are missed off then in your code, this should read 007010??  So that is 70 minutes and 10 seconds past midnight / 00?

    Which of course won’t work as the minutes value cannot be more than 59??

    I just ignore values that are ‘illegal’ when I optimise Time.

    I might be missing something here as I’ve had a long day and just about to go to bed! 🙂

    So does your code work correctly with Time = 007010??

    OR

    Are you saying the value your are using in your code is 070100, so 1 minute past 7, i.e. – 7:01am??

    pdrh thanked this post
    #254519 quote
    pdrh
    Participant
    Average

    I was wanting to otimize

    noentrybeforetime=100000-XY   optimised value 7010

    IfI enter 093050 as the noentrybeforetime  the result does’nt agree with the backtest using 7010 in the variables table .

    Ill try your method Grahal 😊

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

I cant set the time Format in the optimisation


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
pdrh @pdrh Participant
Summary

This topic contains 9 replies,
has 5 voices, and was last updated by pdrh
1 month, 3 weeks ago.

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