Order Cloud based on volume

shakib3585

Active member
VIP
Hello All,

I am requesting a ThinkScript that plots order clouds based on volume. Here's what I request:

- At any given timeframe, each candle experiences a certain volume, with some having more and some less. Based on these volume amounts, I would like to see a cloud-like pattern that visually represents the volume traded at different price levels.

- The script should also include a lookback period feature. This means if I want to compare volume clouds based on the past 5 candles, the script should draw the order cloud reflecting the volume distribution at different levels over that period.

- The order cloud should have distinct colors: red for high volume traded, green for low volume traded, and yellow for volumes that fall between the high and low extremes.

I would sincerely request to help me with this script.

Thank you so much!
 
Solution
Yes, I know Volume profile it is but the traditional one does only based on Days, weeks and months. Also, the traditional one do not give data for a specific set of lookback period..which is why I requested

any solutions please @halcyonguy

bumping up the post for a better reach

The standard TOS Volumeprofile indicator has more basis options than you noted, such as, minutes, bars, etc ... and a multiplier of those.

Nonetheless, the following is another method to view the volumeprofile that will plot the VAH/POC/VAL lines from an input start time for an input length.
You can choose to use either Bar or Minute to use with the input Length to plot the volumeprofile lines.
It seems that if the VolumeProfile moved over the...
Hello All,

I am requesting a ThinkScript that plots order clouds based on volume. Here's what I request:

- At any given timeframe, each candle experiences a certain volume, with some having more and some less. Based on these volume amounts, I would like to see a cloud-like pattern that visually represents the volume traded at different price levels.

- The script should also include a lookback period feature. This means if I want to compare volume clouds based on the past 5 candles, the script should draw the order cloud reflecting the volume distribution at different levels over that period.

- The order cloud should have distinct colors: red for high volume traded, green for low volume traded, and yellow for volumes that fall between the high and low extremes.

I would sincerely request to help me with this script.

Thank you so much!

sorry, your words are too vague to determine what you are asking for.

this is called a volume profile
", I would like to see a cloud-like pattern that visually represents the volume traded at different price levels."
https://toslc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/V-Z/VolumeProfile
 
sorry, your words are too vague to determine what you are asking for.

this is called a volume profile
", I would like to see a cloud-like pattern that visually represents the volume traded at different price levels."
https://toslc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/V-Z/VolumeProfile
Yes, I know Volume profile it is but the traditional one does only based on Days, weeks and months. Also, the traditional one do not give data for a specific set of lookback period..which is why I requested

any solutions please @halcyonguy

bumping up the post for a better reach
 
Last edited by a moderator:
Yes, I know Volume profile it is but the traditional one does only based on Days, weeks and months. Also, the traditional one do not give data for a specific set of lookback period..which is why I requested

any solutions please @halcyonguy

bumping up the post for a better reach

The standard TOS Volumeprofile indicator has more basis options than you noted, such as, minutes, bars, etc ... and a multiplier of those.

Nonetheless, the following is another method to view the volumeprofile that will plot the VAH/POC/VAL lines from an input start time for an input length.
You can choose to use either Bar or Minute to use with the input Length to plot the volumeprofile lines.
It seems that if the VolumeProfile moved over the length, you will sometimes get multiple sets of lines.
The Last set of lines can then be optionally extended.
There are optional clouds that will color the smallest gap between the VAH or VAL and the POC.
The image shows the extended option in the upper panel and without in the lower panel

Screenshot 2024-09-02 080525.jpg
Code:
#VolumeProfile_Start_Time1st_for_Length_wirh_Options_to_Extend_Clouds

input extend  = yes;
input mode    = {default Bars, Minutes};
input start   = 0930;
input length  = 15;
input clouds  = yes;


def vpoc = if mode == mode.Minutes then reference VolumeProfile("time per profile" = "MINUTE" , multiplier = length, "on expansion" = no).POC else reference VolumeProfile("time per profile" = "BAR" , multiplier = length, "on expansion" = no).POC;

def vhi  = if mode == mode.Minutes then reference VolumeProfile("time per profile" = "MINUTE" , multiplier = length, "on expansion" = no).VAHigh else reference VolumeProfile("time per profile" = "BAR" , multiplier = length, "on expansion" = no).VAHigh;

def vlo  = if mode == mode.Minutes then reference VolumeProfile("time per profile" = "MINUTE" , multiplier = length, "on expansion" = no).VALow else reference VolumeProfile("time per profile" = "BAR" , multiplier = length, "on expansion" = no).VALow;

def end  = if SecondsFromTime(start) == 0 then 1 else if end[1] <= length then end[1] + 1 else Double.NaN;

def mpoc = if SecondsFromTime(start) >= 0 and !IsNaN(end) then vpoc else if extend then mpoc[1] else Double.NaN;
def mhi  = if SecondsFromTime(start) >= 0 and !IsNaN(end) then vhi else if extend then mhi[1] else Double.NaN;
def mlo  = if SecondsFromTime(start) >= 0 and !IsNaN(end) then vlo else if extend then mlo[1] else Double.NaN;

plot POC = mpoc;
plot VAH = mhi;
plot VAL = mlo;

DefineGlobalColor("Profile", GetColor(1));
DefineGlobalColor("Point Of Control", GetColor(5));
DefineGlobalColor("Value Area", GetColor(8));

POC.SetDefaultColor(GlobalColor("Point Of Control"));
POC.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
VAH.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
VAL.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
VAH.SetDefaultColor(GlobalColor("Value Area"));
VAL.SetDefaultColor(GlobalColor("Value Area"));

#------------------------
#Clouds - Basis is whichever VAH or VAL is lessor distance from POC

def cloud_basis = if (VAH - POC) < (POC - VAL) then 1 else 0;
AddCloud(if clouds and cloud_basis then VAH else Double.NaN, POC, Color.RED, Color.RED);
AddCloud(if clouds and !cloud_basis then POC else Double.NaN, VAL, Color.GREEN, Color.GREEN);
#
 
Solution
The standard TOS Volumeprofile indicator has more basis options than you noted, such as, minutes, bars, etc ... and a multiplier of those.

Nonetheless, the following is another method to view the volumeprofile that will plot the VAH/POC/VAL lines from an input start time for an input length.
You can choose to use either Bar or Minute to use with the input Length to plot the volumeprofile lines.
It seems that if the VolumeProfile moved over the length, you will sometimes get multiple sets of lines.
The Last set of lines can then be optionally extended.
There are optional clouds that will color the smallest gap between the VAH or VAL and the POC.
The image shows the extended option in the upper panel and without in the lower panel
Oh my God!! Thanks an infinite ton, King @SleepyZ 🙏 🙏
 

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
425 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