Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Why not use aggregation period of DAY to calculate vs daily on each timeframe? For people that use MTF it seems more usefulAlmost seems like you were trying to hype a product from the way you sounded like you had it but didn't have it.. aside from that point ..
since the title of this is "volume forecast" here is my version of it, obviously it wont be the same as yours since the formula is different. As others in the thread have stated, it seems more like hype that anything else, but here goes the code for whoever can find it useful.
Note: Every timeframe will be different as it "forecasts" by the closest volume bars. If you want it relative to the Daily then use the day, if you want it relative to the minute then use the minute, if you want it relative to 30 mins, then use 30 mins and so on. It "Forecasts" till the closing bell, will not factor in afterhours.
Code:#Volume ForeCast v1.0 by XeoNoX via usethinkscript.com #Note: Every timeframe will be different as it "forecasts" by the closest volume. # If you want it relative to the Daily then use the day, if you want it relative to the minute then use the minute, if you want it relative to 30 mins, then use 30 mins and so on. # It "Forecasts" till the closing bell, will not factor in afterhours. def Daily_Total_Vol = volume(period = AggregationPeriod.DAY); def Current_Vol = volume; def VolAvg = Average(volume, 10); def VolAvg2 = Average(volume, 20); def VolAvg3 = Average(volume, 50); def mid_vol = ( if VolAvg > VolAvg2 and VolAvg < VolAvg3 then VolAvg else if VolAvg < VolAvg2 and VolAvg > VolAvg3 then VolAvg else if VolAvg2 > VolAvg3 and VolAvg2 < VolAvg then VolAvg2 else if VolAvg2 < VolAvg3 and VolAvg2 > VolAvg then VolAvg2 else if VolAvg3 > VolAvg2 and VolAvg3 < VolAvg then VolAvg3 else if VolAvg3 < VolAvg2 and VolAvg3 > VolAvg then VolAvg3 else volavg2 ); def vf = (mid_vol * (RegularTradingEnd(GetYYYYMMDD()) - GetTime()) / GetAggregationPeriod()) + Daily_Total_Vol; def percent = (Daily_Total_Vol)/vf; AddLabel (yes, "VF: " + vf , Color.YELLOW); AddLabel (yes, "Volume So Far: " + Daily_Total_Vol , Color.GREEN); AddLabel (yes, "% of VF: " + round(percent*100,0) , Color.GRAY);
you stated "Why not use aggregation period of DAY to calculate vs daily "Why not use aggregation period of DAY to calculate vs daily on each timeframe? For people that use MTF it seems more useful
Unless I don’t understand what you’re saying, TOS definitely lets you aggregate from the day timeframe on intraday charts. I have a label with the running total volume on my intraday chart. It doesn’t matter what time frame I use.you stated "Why not use aggregation period of DAY to calculate vs daily "
if you use the period of day for aggregation to compare a daily then you cant calculate intraday because TOS doesn't allow you to aggregate from day to reference intraday data.
Unless I don’t understand what you’re saying, TOS definitely lets you aggregate from the day timeframe on intraday charts. I have a label with the running total volume on my intraday chart. It doesn’t matter what time frame I use.
If what you're saying is you can't say compare the volume of a 5min bar vs. the daily volume, OK, but why would you want to do that?
The following code shows the daily volume so far on any intraday chart, it doesn't matter what timeframe you're on:
AddLabel(yes, Concat("Daily Volume: ", volume(period = AggregationPeriod.DAY)), Color.GRAY);
Volume forecast should be comparing this daily volume vs. the average daily volume going back x number of days.
Almost seems like you were trying to hype a product from the way you sounded like you had it but didn't have it.. aside from that point ..
since the title of this is "volume forecast" here is my version of it, obviously it wont be the same as yours since the formula is different. As others in the thread have stated, it seems more like hype that anything else, but here goes the code for whoever can find it useful.
Note: Every timeframe will be different as it "forecasts" by the closest volume bars. If you want it relative to the Daily then use the day, if you want it relative to the minute then use the minute, if you want it relative to 30 mins, then use 30 mins and so on. It "Forecasts" till the closing bell, will not factor in afterhours.
Code:#Volume ForeCast v1.0 by XeoNoX via usethinkscript.com #Note: Every timeframe will be different as it "forecasts" by the closest volume. # If you want it relative to the Daily then use the day, if you want it relative to the minute then use the minute, if you want it relative to 30 mins, then use 30 mins and so on. # It "Forecasts" till the closing bell, will not factor in afterhours. def Daily_Total_Vol = volume(period = AggregationPeriod.DAY); def Current_Vol = volume; def VolAvg = Average(volume, 10); def VolAvg2 = Average(volume, 20); def VolAvg3 = Average(volume, 50); def mid_vol = ( if VolAvg > VolAvg2 and VolAvg < VolAvg3 then VolAvg else if VolAvg < VolAvg2 and VolAvg > VolAvg3 then VolAvg else if VolAvg2 > VolAvg3 and VolAvg2 < VolAvg then VolAvg2 else if VolAvg2 < VolAvg3 and VolAvg2 > VolAvg then VolAvg2 else if VolAvg3 > VolAvg2 and VolAvg3 < VolAvg then VolAvg3 else if VolAvg3 < VolAvg2 and VolAvg3 > VolAvg then VolAvg3 else volavg2 ); def vf = (mid_vol * (RegularTradingEnd(GetYYYYMMDD()) - GetTime()) / GetAggregationPeriod()) + Daily_Total_Vol; def percent = (Daily_Total_Vol)/vf; AddLabel (yes, "VF: " + vf , Color.YELLOW); AddLabel (yes, "Volume So Far: " + Daily_Total_Vol , Color.GREEN); AddLabel (yes, "% of VF: " + round(percent*100,0) , Color.GRAY);
def Daily_Total_Vol = volume(period = AggregationPeriod.DAY);
def Current_Vol = volume(period = AggregationPeriod.fifteen_min);
def VolAvg = Average(volume(period = AggregationPeriod.fifteen_min), 10);
def VolAvg2 = Average(volume(period = AggregationPeriod.fifteen_min), 20);
def VolAvg3 = Average(volume(period = AggregationPeriod.fifteen_min), 50);
@lmk99 Your question is probably best answered by TDAmeritrade support
This doesn't make sense to me. How is $DWAC today showing a VF of 515M shares at the time of this post on 33M pre-market volume? Shoudln't the VF be fixed?
No the forecast is the exact opposite of fixed, if you look through the code, its constantly running a series of evaluations vs historical avgs vs the current inflow of volume. It fluctuates throughout the day to show you the in the moment in flow of volume. The point is to track it into the first hour or more of the day to build a thesis on whether or not today could potentially be an outlier volume type of day. this is especially needed for short sellers who may be fighting the front side. Or for someone going head long into over head volume resistance from a previous high volume day, the forecast provides you with somewhat of a barometer on the day and an idea for whether or not your thesis long or short could pan out given you exceed previous high volume days, or underachieve. aka Volume breakout, or all day fade vs historical overhead volume resistance. I check mine every 15 min. and in tradingview have built a table that gives me my % every 15 min and how were tracking on the day. Its a strong tool when used correctly in the right circumstance.This doesn't make sense to me. How is $DWAC today showing a VF of 515M shares at the time of this post on 33M pre-market volume? Shoudln't the VF be fixed?
No, not available on this forumIs there any TOS script that approximates that kind of analysis?
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.