Find out the open/close of the first bar of the week.

Forums ProRealTime English forum ProBuilder support Find out the open/close of the first bar of the week.

Viewing 4 posts - 1 through 4 (of 4 total)
  • #125351

    Hi,

    I would appreciate any input on how to find out the trade of the first bar of the week. The reason is that I want to reset all indicators at the first bar.

    Example:

    Forex opens at 22.00 on Sunday. US futures at 00.00 Monday.

    I tried using IntraDayBarIndex with DayOfWeek, but IntraDayBarIndex which normally shows 0 (zero) on the first bar, also shows 0 (zero) on the first bar in case the first day is not fully loaded.

    I can of course set the specific hours, but the problem is that Daylight saving between countries occurs on different dates, so there are 2-3 weeks difference sometimes which makes this a big problem with my ProBackTesting.

    Any clues as to find out which bar is the first bar?

    Many thanks.

     

    #125360

    The first bar of the week is when OpenDayOfWeek < OpenDayDayOfWeek[1].

    #125700

    Thanks. I overcomplicated things as I was resetting the weekly trades.

     

    #125703

    Sorry for mispelling the second OpenDayOfWeek.

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

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