question re time syntax

Forums ProRealTime English forum ProOrder support question re time syntax

Viewing 12 posts - 1 through 12 (of 12 total)
  • #125997

    To specify an algo’s active time I have normally used

    Then I got it in my head that i could save a lot of zeros by using this instead:

    The two seemed to be interchangeable, until just now when I found an algo that returns completely different results for time as opposed to hour.

    Do they mean different things then? Couldn’t find an answer in the manual.

    #126000

    000030 is greater than 21, but not than 210000!

    1 user thanked author for this post.
    #126002

    As Roberto points out – it depends on the time frame that you run your strategy on. On a 1 hour based strategy there is only a candle every hour so  TIME = 080000 is the same as HOUR = 8 but on a 1 minute time frame there are 59 candles in between where HOUR = 8 but TIME does not equal 080000.

    1 user thanked author for this post.
    #126003

    OK, got it. Hour =8 includes everything in the 8th hour up to the last candle before 9.

    Second question: the main reason I changed was not of course to save zeros, but because it made it easier to optimize on the half hour. How would I check a range of times eg 170000 to 230000 by half hour? Steps of 3000 won’t work.

    #126004

    What I had been doing is running it twice, first on the hour 170000 to 230000, then on the half hour 173000 to 233000 — both by steps of 10000.

    Is there a better way?

    #126006

    I use 10000 steps (1 hour), so you can use 3000 (30 minutes), provided your TF ends on a 30-minute boundary, that is it must not have to be greater than 30 minutes.

    1 user thanked author for this post.
    #126020

    I use 10000 steps (1 hour), so you can use 3000 (30 minutes)

    But that would give you times such as:

    170000

    173000

    176000 (not a valid time)

    179000 (not a valid time)

    182000

    You will have an awful lot of tests with no results to run through.

    Perhaps optimising with two variables would be better and more efficient. MyHour 0 to 23 in steps of 1 and MyMinute 0 to 1 step 1 and then add the following to the start of your strategy:

     

    #126025

    80000 is obviously not the same number as 8! 😉

    #126037

    80000 is obviously not the same number as 8

    Yes, my bank manager has been patiently trying to explain that to me.

    1 user thanked author for this post.
    #126038

    Perhaps optimising with two variables would be better and more efficient. MyHour 0 to 23 in steps of 1 and MyMinute 0 to 1 step 1 and then add the following to the start of your strategy:

    Very clever! I’ll try that, thanks.

    #126059

    Vonasi code above added as Log 205 here …

    Snippet Link Library

     

    1 user thanked author for this post.
    #126129

    Vonasi code above added as Log 205 here …

    Snippet Link Library

    It’s a treasure ! thx Grahal for the link

    1 user thanked author for this post.
Viewing 12 posts - 1 through 12 (of 12 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login