Best way to calculate average (dollar/stock) volume?

Forums ProRealTime English forum ProScreener support Best way to calculate average (dollar/stock) volume?

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

    Hello,

    I made this loop to calculate the average dollar and stock volume over the last 60 days. Is this the best way to do it or can I do it without a loop?

     

    #164629

    Good morning, you can use the “average” keyword applied to “volume” and “volume*close”:

     

    1 user thanked author for this post.
    #164630

    Great, thank you!

    One last question: is this also possible when you want to check the volume from day 50 to day 100? So can I use a different day to start the calculation?

    #164633

    Not sure to understand the question, if “check the volume from day 50” was a way to just accessing it, it’s volume[50]… but if you meant accessing the values from previous post on day 50, it’s same formula and using averageDollarVol[50] and averageStockVol[50]. If you meant something else, sorry I don’t understand could you please rephrase? Thanks.

    #164634

    When I use your formula I get the average volumes from today until day 60. That’s what I need when I analyze the current situation.

    But I also need this for a backtest:

    Here I check another 60 days for the average volume but I start with a different day.

     

    #164635

    ok, 50 to 110 (not 100) so that you have a 60 too, but starting earlier in the past. Then it is indeed the second case: ” … but if you meant accessing the values from previous post on day 50, it’s same formula and using averageDollarVol[50] and averageStockVol[50]” :

    NB: stricly speaking, it would have been 60 to 1, or 59 to 0, or 109 to 50 to get 60. If you really needed 60 to 0 / 110 to 50, then you can replace 60 by 61.

    1 user thanked author for this post.
    #164638

    That helps me a lot, thank you very much!!

    1 user thanked author for this post.
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