Variable optimisation for times of day

Forums ProRealTime English forum ProOrder support Variable optimisation for times of day

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

    I have code that opens a trade at 080000, and I’d like to see whether 080500, 081000 etc is better, ie I’d like to be able to optimise a time variable during the variable optimisation. I’ve tried putting times like 080500 into the ‘Cable in program’ box in the Definition of Variables dialogue box, but with no success.

    Is it possible to do this, and if so, how?

    Thanks

    #134411

    Try 000000 230000 010000 in the Optimiser to optimise to nearest 1 hour then narrow it down to nearest 1 minute etc.

    Time = xx

    OR

    Hour = xx

    and enter … 0 23 1 in the optimiser

    #134461

    I got it working. Thank you for that.

    1 user thanked author for this post.
    #219354

    Hi,

    I’ve the same problem. Can you share the code please?

    thank you!

     

    #219368

    For Time >= xxxxxx

    Try min = 000000 max = 230000 and step = 010000 (in the Optimiser to optimise to nearest 1 hour then narrow it down to nearest 1 minute etc).

    For Hour = xx

    Try min = 0  max = 23 step = 1 (in the optimiser)

    If you need more explanation, just say which bit you don’t understand?

    Code could be something like either of below …

     

     

    1 user thanked author for this post.
    #219370

    Hour = xx code should read as below

     

    1 user thanked author for this post.
    #219371

    For Time >= xxxxxx

    Try min = 000000 max = 230000 and step = 010000 (in the Optimiser to optimise to nearest 1 hour then narrow it down to nearest 1 minute etc).

    For Hour = xx

    Try min = 0 max = 23 step = 1 (in the optimiser)

    If you need more explanation, just say which bit you don’t understand?

    Code could be something like either of below …


    Thank you so much!
    I’m able to optimize with hours (I set 0-23 in optimizer) but not with time: in the optimizer I can’t set 000000 ’cause it replace with 0.

    I have to set pace 10000 (without first 0) so, the time will be 10000, 20000 etc

    I wrong something?

    thx

     

    #219375

    so, the time will be 10000, 20000 etc

    Above is okay, so 10000 is 1 am in the morning.  The Optimiser disregards leading 00’s, but it still works as a variable value in the code.

    0 is also okay as that is midnight (000000).

    We are kidding the Optimiser into working for us! 😉

     

    2 users thanked author for this post.
    #219376

    Thank you GraHal!

    1 user thanked author for this post.
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