ThinkorSwim Volume By Price (VBP) Indicator

Do any of you know if I can find the volume by price study in ThinkorSwim to display volume on the left as horizontal volume bars? I have played with the default ToS Volume Profile indicator and I can't get so it's simple to see on my charts. Is there a custom script that anyone has used in the past for just a simple / easy to read study? I copied a few below from other charting systems for what I consider simple.

hu1sUKr.png


Ky6K4jc.png


Code:
# Volume by Price location
# Mobius
# Chat Room Request 08.16.2016


declare lower;


def Active = if SecondsFromTime(0930) > 0 and
                SecondsTillTime(1600) >= 0
             then 1
             else 0;
def hh = if Active and !Active[1]
         then high
         else if Active and
              high > hh[1]
              then high
              else hh[1];
def ll = if Active and !Active[1]
         then low
         else if Active and
              low < ll[1]
              then low
              else ll[1];
def volP = if ((close - ll) / (hh - ll)) > .5
           then volume
           else -volume;
def data = if Active then
            data[1] + volP
            else data[1];
plot Histo = if Active then data else double.nan;
        Histo.SetPaintingStrategy(paintingStrategy.Histogram);
 
You can do it by using default ToS Volume profile. Only thing that I doubt its possible to move it to the left.

07:10 Dilbert: Someone asked recently if it was possible to plot the volume profile starting for the left of the screen instead of in the expansion area like the native TOS study does. I found in my saved studies this one that TOS posted.

Code:
#HINT: This study plots volume that occurred at different prices.  For example, if timePerProfile of CHART is selected then net total volume of the horizontal volume-by-price will be equal to the net total volume of the vertical volume bars under the chart.\n\n Use horizontal volume-by-price to find areas of hidden support/resistance by noticing prices where largest volume occurred.\n.
 
 
input pricePerRowHeightMode = {default AUTOMATIC, TICKSIZE, CUSTOM};
input customRowHeight = 1.0;
input timePerProfile = {default CHART, MINUTE, HOUR, DAY, WEEK, MONTH, "OPT EXP", BAR}; #HINT timePerProfile: If onExpansion is set to no, select CHART to have horizontal volume-by-price include all volume for entire chart. Or select an aggregation period to show horizontal volume-by-price include only total volume for that time period (for example select MONTH to show only 1 month of volume on aa 1-year daily chart)
input onExpansion = no; #HINT onExpansion: no will plot horizontal volume-by-price bars under the chart bars/candles.  onExpansion yes will plot in the extra space to right of the chart.
input opacity = 40; #HINT opacity: If onExpansion is set to no, DECREASE the opacity number to make price bars/candles easier to see on top of the horizontal volume-by-price bars
input profiles = 1000; #HINT profiles: The numberOfProfiles parameter defines the number of profiles to be displayed if onExpansion is set to no. If onExpansion is set to yes then this parameter is ignored and only one profile is shown.
input multiplier = 1;
 
def period;
def yyyymmdd = getYyyyMmDd();
def seconds = secondsFromTime(0);
def month = getYear() * 12 + getMonth();
def day_number = daysFromDate(first(yyyymmdd)) + getDayOfWeek(first(yyyymmdd));
def dom = getDayOfMonth(yyyymmdd);
def dow = getDayOfWeek(yyyymmdd - dom + 1);
def expthismonth = (if dow > 5 then 27 else 20) - dow;
def exp_opt = month + (dom > expthismonth);
switch (timePerProfile) {
case CHART:
    period = 0;
case MINUTE:
    period = floor(seconds / 60 + day_number * 24 * 60);
case HOUR:
    period = floor(seconds / 3600 + day_number * 24);
case DAY:
    period = countTradingDays(min(first(yyyymmdd), yyyymmdd), yyyymmdd) - 1;
case WEEK:
    period = floor(day_number / 7);
case MONTH:
    period = floor(month - first(month));
case "OPT EXP":
    period = exp_opt - first(exp_opt);
case BAR:
    period = barNumber() - 1;
}
 
def count = CompoundValue(1, if period != period[1] then (count[1] + period - period[1]) % multiplier else count[1], 0);
def cond = count < count[1] + period - period[1];
def height;
switch (pricePerRowHeightMode) {
case AUTOMATIC:
    height = PricePerRow.AUTOMATIC;
case TICKSIZE:
    height = PricePerRow.TICKSIZE;
case CUSTOM:
    height = customRowHeight;
}
 
profile volumeByPrice = volumeProfile("startNewProfile" = cond, "onExpansion" = onExpansion, "numberOfProfiles" = profiles, "pricePerRow" = height);
 
DefineGlobalColor("Profile", color.CYAN);
 
volumeByPrice.show(globalColor("Profile"), color.CURRENT, color.CURRENT, opacity);
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
456 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top