Discretionary Supply Zones across a specific discretionary price level

Trading51

Active member
2019 Donor
Need help would like to be able to have discretionary supply zones in the form of a cloud just like the zigzag supply zones, need help would like to plot at least for discretionary levels. Thanks. A cloud-like this red and green.

QEibj1W.png
 

tomsk

Well-known member
VIP
I've not personally done any ZZ studies from scratch so don't think I can help much with your request. All's I did was to restructure the ZZ Logic in an existing ZigZag study that looked real interesting in order to digest it better. If you have a base study I'll certainly look at that but can't promise you anything though. Several years ago I've even looked at an RSI study and played around with the ZZ code in that. context What a learning experience it was with that I can tell you
 

Trading51

Active member
2019 Donor
@tomsk this is what I have, maybe you can help adjust this all I need to do is change this area I think (PaintingStrategy.Line), im trying to form a line that has something similar to the supply zone, I have grey lines im trying to get them wider and have color like in the first post, a thick colored line, let me know.

declare upper;

input level1 = 3305;
input level2 = 0;
input level3 = 0;
input level4 = 0;

def sLevel1 = level1;
def sLevel2 = level2;
def sLevel3 = level3;
def sLevel4 = level4;


#level 1
plot pLevel1 = highestall(if isnan(close[-1])then round(sLevel1[1] / ticksize(),0) * ticksize() else double.nan);
pLevel1.setpaintingStrategy(paintingStrategy.LINE_VS_TRIANGLES);
pLevel1.setdefaultColor(color.gray);
pLevel1.setlineWeight(2);
pLevel1.SetHiding(!level1 > 0);
addchartBubble(isnaN(close[3]) && !isnaN(close[4]),"price location" = pLevel1, text = "level2 " + pLevel1, color = Color.White);

#level 2
plot plevel2 = highestall(if isnan(close[-1])then round(slevel2[1] / ticksize(),0) * ticksize() else double.nan);
plevel2.setpaintingStrategy(paintingStrategy.LINE_VS_TRIANGLES);
plevel2.setdefaultColor(color.gray);
plevel2.setlineWeight(2);
plevel2.SetHiding(!level2 > 0);
addchartBubble(isnaN(close[3]) && !isnaN(close[4]),"price location" = plevel2, text = "Level1 " + plevel2, color = Color.White);

#level 3
plot plevel3 = highestall(if isnan(close[-1])then round(slevel3[1] / ticksize(),0) * ticksize() else double.nan);
plevel3.setpaintingStrategy(paintingStrategy.LINE_VS_TRIANGLES);
plevel3.setdefaultColor(color.gray);
plevel3.setlineWeight(2);
plevel3.SetHiding(!level3 > 0);
addchartBubble(isnaN(close[3]) && !isnaN(close[4]),"price location" = plevel3, text = "Main Level " + plevel3, color = Color.White);

#level 4
plot plevel4 = highestall(if isnan(close[-1])then round(slevel4[1] / ticksize(),0) * ticksize() else double.nan);
plevel4.setpaintingStrategy(paintingStrategy.LINE_VS_TRIANGLES);
plevel4.setdefaultColor(color.gray);
plevel4.setlineWeight(2);
plevel4.SetHiding(!level4 > 0);
addchartBubble(isnaN(close[3]) && !isnaN(close[4]),"price location" = plevel4, text = "Main Level " + plevel4, color = Color.White);

 

tomsk

Well-known member
VIP
As far as I can see, all your code does is to plot horizontal lines at user defined levels via the input statement. Only 1 level is set, the other 3 levels are all set to 0. Don't think I can help progress this further at this stage. From the sounds of things, it seems like you might be looking for some kind of a pivot study. There are at least 5 or 5 standard pivot studies on TOS, and on the OneNote published by Johnny Quotron, there are a whole lot more. Happy hunting!
 
Last edited:

Trading51

Active member
2019 Donor
As far as I can see, all your code does is to plot horizontal lines at user defined levels via the input statement. Only 1 level is set, the other 3 levels are all set to 0. Don't think I can help progress this further at this stage. From the sounds of things, it seems like you might be looking for some kind of a pivot study. There are at least 5 or 5 standard pivot studies on TOS, and on the OneNote published by Johnny Quotron, there are a whole lot more. Happy hunting!
I just wanted to change the thickness to the lines in a cloud form so i can add it to specific volume profile areas the areas where price has a reaction, i need lines thicker verse these skinny grey lines, i know its simple but i can't figure out how to code a line to make it thicker in a cloud format
 

tomsk

Well-known member
VIP
@Trading51 You lost me there regarding changing the thickness of the lines. As far as I can see you already have the correct code to increase the line thickness. See below. If this is not thick enough, you can replace the "2" in the SetLineWeight statement with either a "3", "4", or "5".

Code:
pLevel1.setlineWeight(2);
 

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.
Top