Time Specific Volume Average ?


Category:
0
0

Hey Pete,

Is there a way to capture the average of a volume bar for a specific time? The Idea is to calculate the average volume for a specific time within a day as opposed to calculating the sum 50 consecutive bars.

lets say we are in a 4 hr chart – obviously only 2 volume bars in a 4 hr chart per day and I want to calculate it this way.

Day 1 : vol bar 1 = 100,000 ; vol bar 2 = 80,000
Day 2 : vol bar 1 = 300,000 ; vol bar 2 = 250,000
Day 3 : vol bar 1 = 150,000 ; vol bar 2 = 200,000

Today : vol bar 1 = (Day 1 vol bar 1 + Day 2 vol bar 1 + Day 3 vol bar 1) / 3
Today : vol bar 2 = (Day 1 vol bar 2 + Day 2 vol bar 2 + Day 3 vol bar 2) / 3

 

I hope my explanation makes sense.

 

Thanks!

Marked as spam
Posted by (Questions: 2, Answers: 1)
Asked on February 3, 2020 7:33 pm
133 views
1
Private answer

There is no simple way to do this in Thinkorswim. The language does not allow us to build custom arrays independent of the price structure on the chart. There have been attempts to do this before. If you search the forum you will find a few posts on this topic. The problem with any solution to this is that the code cannot adapt when you change the time frame on the chart. So any solutions you find here will be for a specific time frame and will not work for others.

Furthermore, even if this were possible in Thinkorswim the effort required to complete this would far exceed the amount of time I permit for free solutions in the Q&A forum.

Marked as spam
Posted by (Questions: 37, Answers: 4079)
Answered on February 4, 2020 8:51 am
0
Thanks for responding, Pete! I appreciate your time.
( at February 4, 2020 12:47 pm)