Time stamp to be converted to a bar index
// Check that its past 9:45 AM
if (ToTime(Time) >= ToTime(9, 45, 00))
// Calculate the bars ago value for the 9 AM bar for the current day
int barsAgo = CurrentBar - Bars.GetBar(new DateTime(2006, 12, 18, 9, 0, 0));
// Print out the 9 AM bar closing price
Print("The close price on the 9 AM bar was: " + Close[barsAgo].ToString());
Plotting an SMA of volume on a futures ETH chart is useless, because it picks up the globex session. I'm trying to figure a way to compare volume to the average volume of that point in time. Example, a 9:30 volume bar to every other 9:30 volume bar since 2010.
I was thinking on using OHL somehow, but I suppose there are better methods. Maybe something already exists that I'm missing?
Any thoughts and I'll pitch in. This is definitely useful and I think others will use it too.
I have coded an indicator which compares the volume of the current bar to the volume of all previous bars with the same day of week and the same time stamp. With default settings, it would compare the volume of today's 1:00 PM bar to the average volume of the 1:00 PM bars of the preceding 20 Fridays. The indicator will
- The indicator will display the relative volume compared to the average.
- Any value below 80% (threshold selectable) will be plotted red.
- Any value between 80% and 120% (thresholds selectable) will be plotted white.
- Any value above 120% (threshold selectable) will be plotted green.
- Specific dates (holidays or crash days) can be excluded from the average.
- The indicator also displays the cumulated value of the relative volume for the entire trading day.
- The indicator deals with daylight savings issues.
Below you will see that today's volume was only 58% of the average volume of the last 20 Fridays. There were only two exciting bars with a high relative volume
- one was a doji at 0:30 - 0:45 EST
- the other one was the bar prior to the regular open from 9:15 to 9:30 EST
If you want to compare the volume since the beginning of 2010, then you would need to increase the lookback period of the chart to 365 + 365 + 230 = 960 days or more and set the number of weeks referenced to 52 + 52 + 32 /* current week of year - 1 */ = 136. It will then compare today's volume to the last 136 weeks.
See chart attached.
The indicator is not one of the most recent ones, so I would need to update it.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
The following 2 users say Thank You to Fat Tails for this post: