scan for highest volume at lowest low

@BenTen I have Brain Shannon's AVWAP script which is very impressive. He has, as a part of the script, where it will automatically anchor a vwap to the "highest volume candle" on the chart. I have found that when that highest volume candle is also the lowest candle on the chart i.e. 1 year daily, 5 day 15 minute.... and holds above that low, there is a MASSIVE run to the upside. And visa versa on the highest candle on the chart.

I tried to do a indicator/scan to find those scenarios, but TOS says it is to complex (using Shannon's whole script).

Is there a way to make a scan that can find the highest volume on the lowest/highest candle on the chart?
Believe me, the results are VERY profitable.

Technically it doesn't repaint, it updates if they're is a new higher volume... but the strategy is when it is at the bottom, and the next candle/candles are above the vwap, (in the bullish scenario) it rips... and usually it doesn't post another high volume vwap for a LONG time. Plus it acts as a great support reverence for the move up for dip buys.
 
Last edited by a moderator:
@BenTen I have Brain Shannon's AVWAP script which is very impressive. He has, as a part of the script, where it will automatically anchor a vwap to the "highest volume candle" on the chart. I have found that when that highest volume candle is also the lowest candle on the chart i.e. 1 year daily, 5 day 15 minute.... and holds above that low, there is a MASSIVE run to the upside. And visa versa on the highest candle on the chart.

I tried to do a indicator/scan to find those scenarios, but TOS says it is to complex (using Shannon's whole script).

Is there a way to make a scan that can find the highest volume on the lowest/highest candle on the chart?
Believe me, the results are VERY profitable.
Vendor script questions should be addressed with the vendor..

However, it should be noted that most Higher Highs/ Lower Lows scripts use recursion; which is resource intensive.
Most of these scripts cannot be used the Scan Hacker.
 
Last edited:

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

@BenTen I have Brain Shannon's AVWAP script which is very impressive. He has, as a part of the script, where it will automatically anchor a vwap to the "highest volume candle" on the chart. I have found that when that highest volume candle is also the lowest candle on the chart i.e. 1 year daily, 5 day 15 minute.... and holds above that low, there is a MASSIVE run to the upside. And visa versa on the highest candle on the chart.

I tried to do a indicator/scan to find those scenarios, but TOS says it is to complex (using Shannon's whole script).

Is there a way to make a scan that can find the highest volume on the lowest/highest candle on the chart?
Believe me, the results are VERY profitable.

Technically it doesn't repaint, it updates if they're is a new higher volume... but the strategy is when it is at the bottom, and the next candle/candles are above the vwap, (in the bullish scenario) it rips... and usually it doesn't post another high volume vwap for a LONG time. Plus it acts as a great support reverence for the move up for dip buys.
Hello: I am interested in the AVWAP script, how can I get it?
 
@BenTen I have Brain Shannon's AVWAP script which is very impressive. He has, as a part of the script, where it will automatically anchor a vwap to the "highest volume candle" on the chart. I have found that when that highest volume candle is also the lowest candle on the chart i.e. 1 year daily, 5 day 15 minute.... and holds above that low, there is a MASSIVE run to the upside. And visa versa on the highest candle on the chart.

I tried to do a indicator/scan to find those scenarios, but TOS says it is to complex (using Shannon's whole script).

Is there a way to make a scan that can find the highest volume on the lowest/highest candle on the chart?
Believe me, the results are VERY profitable.

Technically it doesn't repaint, it updates if they're is a new higher volume... but the strategy is when it is at the bottom, and the next candle/candles are above the vwap, (in the bullish scenario) it rips... and usually it doesn't post another high volume vwap for a LONG time. Plus it acts as a great support reverence for the move up for dip buys.

3 versions to find matches of highest or lowest to volume bar
doesn't include vwap. i didn't study the reference video.
-------------------------------------

scan code
(tested in lower chart)

if within the last 100 bars, check if the highest high or lowest low were on the same bar as the highest volume. can change the look back number.


Code:
#hi_vol_at_hi_scanlower

#zhivolbar
#hi_vol_at_highest_or_lowest

#https://usethinkscript.com/threads/scan-for-highest-volume-at-lowest-low.15907/#post-138862
#scan for highest volume at lowest low
#Ronathan Edwards 
#Jul 1, 2023
##1

# test
# 3/1  DUK  15min  hi

declare lower;

def na = Double.NaN;
def bn = BarNumber();

def lastbn = highestall(if isnan(close) then 0 else bn);
def lastbar = (lastbn == bn);

def c = close;
def h = high;
def l = low;
def v = volume;

#pick qty of bars back from last bar
input bars = 100;
# enable, last x bars on chart
def en = (!IsNaN(close) and IsNaN(close[-bars]));
def firstbar = (!IsNaN(close[-(bars - 1)]) and IsNaN(close[-bars]));

#AddVerticalLine(firstbar, "-", Color.CYAN);

input within_bars = 3;

def hi_off = if lastbar then GetMaxValueOffset(h , bars) else 0;
def lo_off = if lastbar then GetMinValueOffset(l , bars) else 0;
def vol_off = if lastbar then GetMaxValueOffset(v , bars) else 0;

#def hi = GetValue(h, hi_off);
#def lo = GetValue(l, lo_off);
#def vol = GetValue(v, vol_off);

def ishi = (hi_off > 0 and hi_off == vol_off);
def islo = (hi_off > 0 and lo_off == vol_off);
def iswhi = (hi_off > 0 and hi_off + within_bars) >= vol_off and (hi_off - within_bars) <= vol_off;
def iswlo = (hi_off > 0 and lo_off + within_bars) >= vol_off and (lo_off - within_bars) <= vol_off;


plot z = if ishi or islo then 1
# else if iswhi or iswlo then 1
 else 0;

#


--------------------------

column code

show a colored cell if highest high bar matches high volume, or if lowest low matches.
or if hi or lo is near vol bar

# test stocks 3/1
# DUK 15min hi
# FDX 15min hi
# CRM 15min lo
# AMGN 15min lo
# BAC 15min near hi
# PEP 15min near lo


Code:
#zhivolbar
#hi_vol_at_highest_or_lowest

#https://usethinkscript.com/threads/scan-for-highest-volume-at-lowest-low.15907/#post-138862
#scan for highest volume at lowest low
#Ronathan Edwards 
#Jul 1, 2023
##1

# test
# 3/1  DUK  15min  hi

def na = Double.NaN;
def bn = BarNumber();

def lastbn = highestall(if isnan(close) then 0 else bn);
def lastbar = (lastbn == bn);

def c = close;
def h = high;
def l = low;
def v = volume;

#pick qty of bars back from last bar
input bars = 100;
# enable, last x bars on chart
def en = (!IsNaN(close) and IsNaN(close[-bars]));
def firstbar = (!IsNaN(close[-(bars - 1)]) and IsNaN(close[-bars]));

#AddVerticalLine(firstbar, "-", Color.CYAN);

input within_bars = 3;

def hi_off = GetMaxValueOffset(h , bars);
def lo_off = GetMinValueOffset(l , bars);
def vol_off = GetMaxValueOffset(v , bars);

def hi = GetValue(h, hi_off);
def lo = GetValue(l, lo_off);
def vol = GetValue(v, vol_off);

def ishi = (hi_off == vol_off);
def islo = (lo_off == vol_off);
def iswhi = (hi_off + within_bars) >= vol_off and (hi_off - within_bars) <= vol_off;
def iswlo = (lo_off + within_bars) >= vol_off and (lo_off - within_bars) <= vol_off;

def hibn = highestall(if lastbar then (lastbn - hi_off) else 0);
def lobn = highestall(if lastbar then (lastbn - lo_off) else 0);
def vbn = highestall(if lastbar then (lastbn - vol_off) else 0);

#plot zhi = if hibn == bn then high*1.001 else na;
#zhi.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
##zhi.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
#zhi.SetDefaultColor(Color.green);
#zhi.setlineweight(4);
#zhi.hidebubble();

#plot zlo = if lobn == bn then low*0.999 else na;
#zlo.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
#zlo.SetDefaultColor(Color.red);
#zlo.setlineweight(4);
#zlo.hidebubble();

#plot zv = if vbn == bn then high*1.002 else na;
#zv.SetPaintingStrategy(PaintingStrategy.squares);
#zv.SetDefaultColor(Color.blue);
#zv.setlineweight(4);
#zv.hidebubble();


#  if vol bar = hi bar then green
#  if vol bar = lo bar then red
#  if vol bar is within x bars of hi bar then cyan
#  if vol bar is within x bars of lo bar then yellow
#  if no match then gray

AddLabel(1,
(if ishi then "1 Highest High"
 else if islo then "2 Lowest Low"
 else if iswhi then "3 Near High"
 else if iswlo then "4 Near Low"
 else "5 ---"),
color.black
);


AssignBackgroundColor(
if ishi then color.green
 else if islo then color.red
 else if iswhi then color.cyan
 else if iswlo then color.yellow
 else color.gray);



#addlabel(1, " ", color.black);
#AddLabel(1, "highest high offset " + hi_off, Color. YELLOW);
#AddLabel(1, hi, color.cyan);
#addlabel(1, " ", color.black);
#AddLabel(1, "lowest low offset " + lo_off, Color. YELLOW);
#AddLabel(1, lo, color.cyan);
#addlabel(1, " ", color.black);
#AddLabel(1, "volume offset " + vol_off, Color. YELLOW);
#AddLabel(1, vol, color.cyan);


# ------------

#AddChartBubble(0, low,
#bn + "\n" +
#v
#, Color.YELLOW, no);

#



--------------------------

this is a test code for upper chart

define the last x bars to find a highest and lowest. default is 100 bars back from last bar.
find 3 bars, highest high, lowest low, and highest valume.
if the highest high happens on the high volume bar, then a label is green.
if the lowest low happens on the high volume bar, then a label is red.
draw triangles for high and low and volume bars.
labels show the offset to the bars and the values

also can pick quantity of bars for volume to be near highest and lowest. default is 3.

test,
DUK 15min , high matches, green label


Code:
#hi_vol_at_highest_or_lowest

#https://usethinkscript.com/threads/scan-for-highest-volume-at-lowest-low.15907/#post-138862
#scan for highest volume at lowest low

# test
# 3/1  DUK  15min  hi

def na = Double.NaN;
def bn = BarNumber();

def lastbn = highestall(if isnan(close) then 0 else bn);
def lastbar = (lastbn == bn);

def c = close;
def h = high;
def l = low;
def v = volume;

#pick qty of bars back from last bar
input bars = 100;
# enable, last x bars on chart
def en = (!IsNaN(close) and IsNaN(close[-bars]));
def firstbar = (!IsNaN(close[-(bars - 1)]) and IsNaN(close[-bars]));

AddVerticalLine(firstbar, "-", Color.CYAN);

input within_bars = 3;

def hi_off = GetMaxValueOffset(h , bars);
def lo_off = GetMinValueOffset(l , bars);
def vol_off = GetMaxValueOffset(v , bars);

def hi = GetValue(h, hi_off);
def lo = GetValue(l, lo_off);
def vol = GetValue(v, vol_off);

def ishi = (hi_off == vol_off);
def islo = (lo_off == vol_off);
def iswhi = (hi_off + within_bars) >= vol_off and (hi_off - within_bars) <= vol_off;
def iswlo = (lo_off + within_bars) >= vol_off and (lo_off - within_bars) <= vol_off;

def hibn = highestall(if lastbar then (lastbn - hi_off) else 0);
def lobn = highestall(if lastbar then (lastbn - lo_off) else 0);
def vbn = highestall(if lastbar then (lastbn - vol_off) else 0);

plot zhi = if hibn == bn then high*1.001 else na;
zhi.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
#zhi.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
zhi.SetDefaultColor(Color.green);
zhi.setlineweight(4);
zhi.hidebubble();

plot zlo = if lobn == bn then low*0.999 else na;
zlo.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
zlo.SetDefaultColor(Color.red);
zlo.setlineweight(4);
zlo.hidebubble();

plot zv = if vbn == bn then high*1.002 else na;
zv.SetPaintingStrategy(PaintingStrategy.squares);
zv.SetDefaultColor(Color.blue);
zv.setlineweight(4);
zv.hidebubble();


#  if vol bar = hi bar then green
#  if vol bar = lo bar then red
#  if vol bar is within x bars of hi bar then cyan
#  if vol bar is within x bars of lo bar then yellow
#  if no match then gray

AddLabel(1,
(if ishi then "Highest High"
 else if islo then "Lowest Low"
 else if iswhi then "Near High"
 else if iswlo then "Near Low"
 else "---"),
(if ishi then color.green
 else if islo then color.red
 else if iswhi then color.cyan
 else if iswlo then color.yellow
 else color.gray)
);

addlabel(1, " ", color.black);
AddLabel(1, "highest high offset " + hi_off, Color. YELLOW);
AddLabel(1, hi, color.cyan);
addlabel(1, " ", color.black);
AddLabel(1, "lowest low offset " + lo_off, Color. YELLOW);
AddLabel(1, lo, color.cyan);
addlabel(1, " ", color.black);
AddLabel(1, "volume offset " + vol_off, Color. YELLOW);
AddLabel(1, vol, color.cyan);

# ------------

AddChartBubble(0, low,
bn + "\n" +
v
, Color.YELLOW, no);
#
 

Attachments

  • 00c-col.JPG
    00c-col.JPG
    63.2 KB · Views: 100
  • 00c-upper-1.JPG
    00c-upper-1.JPG
    138.4 KB · Views: 101
I read this thinking about a scan and came up with the following:
Code:
def lookback = 100;

def volume_condition = if volume[1] == highest(volume, lookback) then 1 else 0;

def price_condition = if close[1] == lowest(close, lookback) then 1 else 0;
# def price_condition = if close[1] == highest(close, lookback) then 1 else 0;

# be sure to uncomment the correct side of vwap to match the price_condition direction.
def vwap_condition = if close > VWAP() then 1 else 0;
# def vwap_condition = if close < VWAP() then 1 else 0;

plot eureka = if volume_condition == 1 and price_condition == 1 and vwap_condition == 1 then 1 else double.nan;

I may have missed something, and I never did watch the video above, but I think this gets at the original poster's basic idea. And as a scan, we only need to look at things happening in the last few bars.

just my 2.83¢ (2¢ adjusted for inflation)

-mashume
 
Thread starter Similar threads Forum Replies Date
H Scan for RSI>60 and MACD crossover +more Questions 0
S scan help for relative volume Questions 0
A Engulfing Candle Scan Questions 0
D Power X Scan Questions 0
A Bull/Bear 180 Scan Questions 0

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
486 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