VWAP Watchlist Label Scan for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
I wanted to quickly know if the stock price is currently above or below VWAP (Volume Weighted Average Price). One of our developers were able to help me put together a watchlist column that shows just that. Here is what it looks like.

Shared WatchList Link: http://tos.mx/X7jLAge Click here for --> Easiest way to load shared links
7P8f0QI.png


Notes:
  • Green means price is currently above VWAP
  • Red means price is currently below VWAP

thinkScript Code

Rich (BB code):
plot vwap = vwap();
AssignBackgroundColor(if close > vwap then Color.DARK_GREEN else if close < vwap then Color.DARK_RED else Color.Dark_ORANGE);

Credit:
  • WalkingBallista
 
Last edited by a moderator:

Likos

Member
2019 Donor
@BenTen In your opinion, how does it help determine action decision?

 
Last edited:

BenTen

Administrative
Staff member
Staff
VIP
@Likos To me, above VWAP is bullish and below VWAP is bearish.

 
Last edited:

Likos

Member
2019 Donor
@BenTen Hopefully not to sound confusing, how does that make a definite sure thing buy/sell/hold? So let's say for example it suddenly turns green, is this bullish mode? What does the orange indicate?

 
Last edited:

BenTen

Administrative
Staff member
Staff
VIP
@Likos There is no orange on that specific column that was something else. Here is a good article on different ways to trade using VWAP.

 
Last edited:

San

Member
2019 Donor
@BenTen

@BenTen, Can you clarify this is Script for indicator? After i created the indicator using above script i get full chart Orange color?

 
Last edited:

BenTen

Administrative
Staff member
Staff
VIP
@San This is not an indicator. Click Customize on your Watchlist > Custom Quotes > select one of the of the custom column and just paste the code in there.

r6qZnZr.png


 
Last edited:

thinky

Member
1) What time frame are you using?

2) Can the code be edited to just show Last for indexes like SPX and NDX, instead of NaN?

Thinking about removing Last column to make some space.
 
Last edited:

markos

Well-known member
VIP
@thinky nothing special at all, on my Android. It seems to start from the 2nd day on a one day 5 minute chart or on the 4th day on a 3 day 15 minute chart. I do not know why at this point.
It is a VWAP that happens to work on Android intraday only. That is the way that Mobius built it. BTW, I tried on a 10 day and one hour chart and android showed me 12 days. However, the VWAP did seem to restart every day at the open. It may be buggy, do your Due Diligence. If it doesn't work properly then don't use it.
 

markos

Well-known member
VIP
@thinky nothing special at all, on my Android. It seems to start from the 2nd day on a one day 5 minute chart or on the 4th day on a 3 day 15 minute chart. I do not know why at this point.
It is a VWAP that happens to work on Android intraday only. That is the way that Mobius built it. BTW, I tried on a 10 day and one hour chart and android showed me 12 days. However, the VWAP did seem to restart every day at the open. It may be buggy, do your Due Diligence. If it doesn't work properly then don't use it.
I found out where the bug was on android. When using the intraday VWAP on android, you must have "use extended hours" turned ON.
 
Is there is script that sound alerts you when candle crosses over or below vwap on the chart you are currently on. Sometimes you have multiple charts open and it would be nice to get an alert if a stock just touched vwap.
 

BenTen

Administrative
Staff member
Staff
VIP
Try this, did it on the go so I have not tested it yet.

Code:
def bull_cross = close crosses above VWAP;
def bear_cross = close crosses below VWAP;

# Alerts
Alert(bull_cross, " ", Alert.Bar, Sound.Chimes);
Alert(bear_cross, " ", Alert.Bar, Sound.Bell);
 

Playstation

Active member
VIP
@San This is not an indicator. Click Customize on your Watchlist > Custom Quotes > select one of the of the custom column and just paste the code in there.

Am I doing the right steps? I added this code as a study.
Then go to my watchlist>Custom Quotes. Filled in like this:
yd6YdNM.png

No colors on my watchlist though.
 

tomsk

Well-known member
VIP
@Jimmy Here is your COMBINED label to display as a chart label. Note that because you are displaying multiple pieces of info, you won't be able to contain all this in a single watchlist UNLESS you simplify the display. This should give you some ideas how to best structure what you'd eventually like to implement

Code:
# Distance from SMA and VWAP
# tomsk
# 12.12.2019

input length = 9;

def sma = Average(close, length);
def DistanceSMA = (close - sma);
def vwapValue = VWAP();
def DistanceVWAP = (close - vwapValue);

AddLabel(1, "Distance SMA(" + length + ") = " + AsText(DistanceSMA) + " (" + AsPercent(close/sma-1) + ") " + "VWAP = " + AsText(DistanceVWAP) + " (" + AsPercent(close/vwapValue-1) + ")", 
    if close > sma and close > vwapValue then Color.GREEN else if close < sma and close < vwapValue then Color.RED else if close < sma and close > vwapValue then Color.YELLOW else if close 

> sma and close < vwapValue then Color.ORANGE else Color.WHITE);
# End Distance from SMA and VWAP
 

Jimmy

New member
@tomsk Thank you,

I've been working on this for a while, you're right there's a lot of info for a column... probably just go with leaving the price distance off the column and just go with the conditions...if price above both sma and VWAP color green and so on.

Again thank you for your time and insight. Much appreciated
 

tomsk

Well-known member
VIP
Simplification is the key. The watchlists already have very limited real estate to display info, what you're suggesting can be challenging.
If you really must have the info on your watchlist, then you may consider separate watchlist columns
A third alternative is just to color code your watchlist and dispense with the other info like distance, percentage, etc
Keep it simple
 

Jimmy

New member
Yes, you are right.
Your only allowed so much data per list..(1500 I believe) unless you pay for extra data. So it would only be able to handle a couple of stocks.
I would like to add distance from 9 to VWAP to the label as well.. working on it now.
I can't thank you enough for this script.
I scalp trade during the day from the average price line(which is basically the 9) to VWAP and this gives me a really good visual of the actual price move. The percentage distance I will use as a scan once I can determine through logging a consistent range before price re-traces.
Thank you again
 

Jimmy

New member
Yes, you are right.
Your only allowed so much data per list..(1500 I believe) unless you pay for extra data. So it would only be able to handle a couple of stocks.
I would like to add distance from 9 to VWAP to the label as well.. working on it now.
I can't thank you enough for this script.
I scalp trade during the day from the average price line(which is basically the 9) to VWAP and this gives me a really good visual of the actual price move. The percentage distance I will use as a scan once I can determine through logging a consistent range before price re-traces.
Thank you again
Simplification is the key. The watchlists already have very limited real estate to display info, what you're suggesting can be challenging.
If you really must have the info on your watchlist, then you may consider separate watchlist columns
A third alternative is just to color code your watchlist and dispense with the other info like distance, percentage, etc
Keep it simple
For some reason the values are off on my chart... VWAP on the label doesn't match the VWAP line on the chart... Any ideas on what I need to do to fix this
 

Similar threads

Top