avg. Volume indicator for trading hours ONLY

Forums ProRealTime English forum ProBuilder support avg. Volume indicator for trading hours ONLY

Viewing 3 posts - 1 through 3 (of 3 total)
  • #111448

    Hello everyone,
    I want to create an average volume indicator which only considers the volume of the trading hours and neglects the out of trading hours.
    In my opinion the out of trading hours delute the average.

    Conditions:
    1h timeframe
    trading hours 07:00 until 22:00
    lookback: last 10 bars

    Example A: it is 20:00 o’clock. The lookback 10 periods 10:00 – 20:00. Entire average[10] is in trading hours
    Example B: its 10:00 o’clock. 10 period lookback should be from 07:00 – 10:00 current day and 15:00 – 22:00 previous day.

    Is it possible to create an “While loop” or “for loop” instead of plenty “if-then” conditions?
    How do I achieve that in a code?
    Does anybody have an idea?

    Kind regards

    #111453

    Similar question to one I was helping with recently that can be found here:

    https://www.prorealcode.com/topic/how-to-apply-an-indicator-on-day-session-only/#post-110820

    Just change myIndicator from RSI to VOLUME.

    1 user thanked author for this post.
    #111537

    Thanks a lot Vonasi for pointing me in the right direction.
    It helped me a great deal.

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

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