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: