Comparing current volume to previous day

Login or Register

Please login or register in order to view and post in the Forum.

3 posts / 0 new
Last post
Epicuros901
Last seen: 10 months 2 weeks ago
Joined: 08/18/2017 - 09:02
Comparing current volume to previous day

Hello,

I am new to IRT and very happy so far. I am currently retooling various indicators I coded for TOS using Thinkscript and have had great success except for one so far. I searched through the RTL reference pages and forums but could not quite find the solution.

I am hoping to continuously compare the current volume total of today's session to the volume total of the previous session at the same time. So, if volume in the ES were 100k at 10:00am today I would like to know how much this differs from the volume of the previous session at 10:00am.

So far I have made a custom indicator using SUM( VOL , POS ) that works great for providing a running volume total regardless of periodicity, as if I were just watching a day bar's volume histogram. From here I would like to incrementally subtract the previous session's volume total from today's volume total as the trading day progresses.

Something like this: SUM( VOL , POS ) - (previous session's volume at same time)

The issue I have is referencing the bar value (volume total) at the same time during the previous session for comparison. I looked into SETV, GETV and even re-configuring POS to count back from the end of data, but cannot get it to work right. In Thinkscript referencing a previous bar's value would be accomplished with GetValue(data, offset).

Is there something similar in RTL?

Sorry in advance if I overlooked something simple, or if this functionality is already provided in a current indicator.

Thank you!

0
cpayne
Last seen: 1 year 8 months ago
Joined: 03/30/2009 - 00:00
Relative Volume - Session Statistics

Epicuros,

The Session Statistics is custom made for this type of analysis.  There are a variety of multi-session options which allow you to compare current session volume to prior sessions (last session, avg of last 10 sessions, etc).  Import this chart definition.  The bottom pane shows the "Relative Volume" which is simply dividing current cumulative volume by previous cumulative volume (and multiplying by 100 for a percentage).  The oscillator rotates about 100.  So above 100 means exceeding yesterdays pace while under 100 means coming up short of yesterdays pace.  Bottom pane shows difference between current sessions cumulative volume and that of previous session.  This should work fine on any time based (minutes or seconds) periodicity.  Let me know if this gives you what you're after.

Chart Definition: https://www.linnsoft.com/charts/relativevolumeprevioussession-nq

Epicuros901
Last seen: 10 months 2 weeks ago
Joined: 08/18/2017 - 09:02
Exactly what I need

Thank you Chad for such a quick reply. This is exactly what I need! It also handles comparative range which I need as well.

I really appreciate the work you have put into IRT. For so long I had to do things the hard way so it has really been nice to have such great functionality available.

Thanks again!