Determine a specific day

Forums ProRealTime English forum ProBuilder support Determine a specific day

Viewing 7 posts - 1 through 7 (of 7 total)
  • #42471

    Hi guys,

    is there a way to retrieve a specific day of the year? For example: My indicator should show me the 01.04.2017 and the 02.07.2017 with backgroundcolor.

    I need this because my trading system should rebalance my positions quarterly.

     

    Thanks in advance

    Business Trader

    #42481

    You may try this piece of code (I tested it, but I am not sure that’s what you want):

     

    #42938

    Thx Roberto,

    il will give it a try and let you know about the results.

     

    Greets from Italy to Italy 😉

    #42946

    I tried your code with following results:

    It shows me (plus/minus) the first monday of each month. The goal should be to fetch every first trading day (not saturday or sunday) of the quarter.

    Any solutions?

     

    Many regards

    Tradewolf

     

    #42952

    I tried this one:

    But it does not work as expected. I still cannot understand, for DAILY bars, what is returned bu DayOfWeek when the indicator is executed, the DAY of the closed BAR or the DAY of the bar which is opening?!

    And If I want to change the background it changes the nackground color of the opening bar, since the bar that is close has already been displayed on video, is it true?

    Only Nicolas can help us out! Thanks a lot!!!

     

     

    #42958

    The following code should work, not just for standard quarters, but also even with a January 1st on a friday the code should/would pick monday Jan.4th instead of friday Jan.1st:

     

    4 users thanked author for this post.
    #43026

    Thanks Noobywan, this did the trick. “OpenDay” was new to me. Never used it.

    Regards

     

Viewing 7 posts - 1 through 7 (of 7 total)

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