Previous day high and low as well as POC

TapthatAsk

Member
VIP
Really would like to make this indicator from JQ's one drive be scanable to show previous day high or low and possibly POC, it ****s to manually look at all the different tickers to see this info, versus it just populating once any of the conditions are met preferably price close within 2 bars or maybe 5% of the previous day high or low with an option to scan for POC if it cant all be combined with the "any" "or" statement. At this point if I had to comment out the code to scan for each of the 3 I'm all for it. Attached is the code any help is needed. Script to scanner is what I'm going for on this one. @ApeX Predator @SleepyZ

Rich (BB code):
input daysback = 1;
input showonexpansion = no;

def ymd = GetYYYYMMDD();
def candles = !IsNaN(close);
def capture = candles and ymd != ymd[1];
def dayCount = CompoundValue(1, if capture then dayCount[1] + 1 else dayCount[1], 0);
def thisDay = (HighestAll(dayCount) - dayCount) ;

def poc = if thisDay == daysback then reference VolumeProfile("price per row height mode" = "TICKSIZE", "time per profile" = "DAY", "on expansion" = no) else poc[1];
def phigh = if thisDay == daysback then reference VolumeProfile("price per row height mode" = "TICKSIZE", "time per profile" = "DAY", "on expansion" = no).ProfileHigh else phigh[1];
def plow = if thisDay == daysback then reference VolumeProfile("price per row height mode" = "TICKSIZE", "time per profile" = "DAY", "on expansion" = no).ProfileLow else plow[1];
def popen = if thisday == daysback then open(period=aggregationPeriod.DAY) else popen[1];

plot poc1 = if showonexpansion and !isnan(close) or thisDay > daysback then Double.NaN else poc;
plot high1 = if showonexpansion and !isnan(close) or thisDay > daysback then Double.NaN else phigh;
plot low1 = if showonexpansion and !isnan(close) or thisDay > daysback then Double.NaN else plow;
plot open1 = if showonexpansion and !isnan(close) or thisday > daysback then double.nan else popen;
plot mid1 = if showonexpansion and !isnan(close) or thisDay > daysback then Double.NaN else (phigh + plow) / 2;

poc1.setdefaultColor(color.cyan);
high1.setdefaultColor(color.yellow);
low1.setdefaultColor(color.yellow);
open1.setdefaultColor(color.magenta);
mid1.setdefaultColor(color.yellow);

input bubblemover = 5;
def b = bubblemover;
def b1 = b + 1;
input showbubbles = yes;
addchartBubble(showbubbles and isnan(close) and !isnan(close[b1]), poc1, "POC-" + daysback, poc1.takevalueColor());
addchartBubble(showbubbles and isnan(close) and !isnan(close[b1]), high1, "H-" + daysback, high1.takevalueColor());
addchartBubble(showbubbles and isnan(close) and !isnan(close[b1]), low1, "L-" + daysback, low1.takevalueColor());
addchartBubble(showbubbles and isnan(close) and !isnan(close[b1]), open1, "O-" + daysback, open1.takevalueColor());
addchartBubble(showbubbles and isnan(close) and !isnan(close[b1]), mid1, "M-" + daysback, mid1.takevalueColor());
 
Last edited:

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