CFDs – Average Volume during Market hours

Forums ProRealTime English forum ProBuilder support CFDs – Average Volume during Market hours

Viewing 14 posts - 1 through 14 (of 14 total)
  • #155186

    Hello, I’d like to:

    1/ compare in Intraday current volume to Average[20](Volume) taking into account only volume during normal market hours, for example 9am to 5.30pm for DAX. The average should exclude volumes during the period 5.30pm to 9.00am next day.

    2/ compare current volume (today) VS yesterday’s volume at the same time, for example volume today between 9.00am and 9.30am VS volume the day before between 9.00am and 9.30 am.

    Thanks

    #155190

    Khaled – I guess that you are requesting someone to code you an indicator? If so then you have posted in the wrong forum. I have moved your topic to the place for indicators.

    Post your topic in the correct forum:
    _ ProRealTime Platform Support: only platform related issues.
    _ ProOrder: only strategy topics.
    _ ProBuilder: only indicator topics.
    _ ProScreener: only screener topics
    _ General Discussion: any other topics.
    _ Welcome New Members: for new forum members to introduce themselves.

    #155236

    Thank you Vonasi!

    #155415

    Good morning, maybe my initial request was not clear enough…

    Let’s assume:

    volume 5 min bar closing at 17:25 is 50 (the previous day)

    volume 5 min bar closing at 17:30 is 70 (the previous day)

    volume 5 min bar closing at 08:50 is 100

    volume 5 min bar closing at 08:55 is 120

    volume 5 min bar closing at 09:00 is 200

    volume 5 min bar closing at 09:05 is 250

    I’d like to calculate the Simple Average Volume on last 4 bars excluding the time from 17:30pm to 08:59 am, i.e. average of (50, 70, 200, 250)=142.5

    When I apply the condition

    the first average calculated at 09:00 will take into account the four bars closing before 09:00, i.e. (09:00, 08:55, 08:50, 08:45)

    Thank you for you help.

    #155422
    #155440

    Thank you Roberto. I’m afraid this doesn’t solve my problem.

    I have copied the “Time Range Simple Moving Average” code and changed “TRSMA” into “TRAV” (Time Range Average Volume” and replaced “Close” with “Volume”. Kept Periods = 20

    On a 5 min TF, if you look at the candle starting 28 Dec. at 09:00 the volume is 1199 but the TRAV is 59.95 (1199/20). The second candle starting at 09:05 shows a volume of 727, so the average (from the begining of the day) shoud be = 963, but the TRAV shows 96.30 (dividing by 20 instead of dividing by the number of candles since 09:00am). So the code divides the cumulative volume by 20.

    I tried to tweak the code to get this value corresponding to the average but I was unsuccesful.

    Can you please look again at this (maybe using summation or average formula)?

    Thanks a million.

    #155442

    Maybe this?

    Only works on v11

     

    1 user thanked author for this post.
    #155443

    Thank you Vonasi. Doesn’t work on the first bar of the 28th Dec. Divides the Vol by 4 instead of 1, same issue with the second bar, divides the Cumulative Vol by 4 instead of 2.

    #155447

    Solved! Thank you very much for your help, Roberto and Vonasi!!!!

    As you can see, the Avg Vol on the first 30 min bar is equal to the volume of the first bar, works well for the second, etc.

    #155458

    Glad you found your answer. I didn’t get that that was the problem you were trying to solve from your descriptions and I guess Roberto didn’t either. 🙂

    1 user thanked author for this post.
    #155459

    You might want to change TIME for OPENTIME as TIME is the closing time of a candle so you will miss the first candle in your session.

     

    1 user thanked author for this post.
    #155460

    This does the same thing:

     

    1 user thanked author for this post.
    #155461

    Thank you so much Vonasi! Will use this associated with STD on Vol and compare the Current Session to Day-1 and/or Week-1 (same day) to confirm acceleration in the market activity (sort of filter).

    #155464

    Good to hear you have solved it!

    The average is made to account for PERIODS units, no matter the time. If your time starts at 9, it will consider 1 current bar + the last 19 bars of the previous day before 17:30.

    Since volume was 0 last Thursday, actually it seems the average of the first candle is volume / 20 periods. NO, it’s the sum of the volume of the last 20 periods / 20 periods. Of course it considers only periods within the defined time range.

     

    1 user thanked author for this post.
Viewing 14 posts - 1 through 14 (of 14 total)
Similar topics:

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