K_O_Trader
Member
@horserider is there any way this indicator can be turned into a column on my watchlist?
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
@horserider is there any way this indicator can be turned into a column on my watchlist?
Hello Gurus, , I would like to show the RVOL in the chart itself (upper left) instead of as a column in the watch list. Actually I would like to see some BASIC info for the ticker on the upper left corner of the chart such as these - RVOL, Market cap, Shares etc. I really really appreciate your help. Thanks
input STime = 0930 ; #hint STime: Start of normal trading hours
input ETime = 1600 ; #hint ETime: End of normal trading hours
input thold = 1.5 ; #hint told: Threshold for color break
#def bpd = 39 ; # 10mins Bars per day during active trading hours
#def bpd = 78 ; # 5mins Bars per day during active trading hours
def bpd = 130 ; # 3mins Bars per day during active trading hours
def daycnt = 10; # Number of days
def IsActive = if secondsTillTime(ETime) > 0 and
secondsFromTime(STime) >= 0
then 1
else 0;
# This is the cumulative volume for the current day between STime and ETime
def cumVolume = if IsActive and !IsActive[1]
then volume[1]
else if IsActive then cumVolume[1] + volume[1]
else cumVolume[1];
# This is the average cumulative volume over the same time period from the previous 10 days
def cumVolumePrev = if IsActive and !IsActive[1]
then (volume[(bpd*1)+1] + volume[(bpd*2)+1] + volume[(bpd*3)+1] + volume[(bpd*4)+1] + volume[(bpd*5)+1] + volume[(bpd*6)+1] + volume[(bpd*7)+1] + volume[(bpd*8)+1] + volume[(bpd*9)+1] + volume[(bpd*10)+1] ) / daycnt
else if IsActive then cumVolumePrev[1] + (volume[(bpd*1)+1] + volume[(bpd*2)+1] + volume[(bpd*3)+1] + volume[(bpd*4)+1] + volume[(bpd*5)+1] + volume[(bpd*6)+1] + volume[(bpd*7)+1] + volume[(bpd*8)+1] + volume[(bpd*9)+1] + volume[(bpd*10)+1] ) / daycnt
else cumVolumePrev[1];
plot RelVol = cumVolume / cumVolumePrev ;
AddLabel(yes, Concat("Rvol: ", Round(RelVol)),Color.YELLOW);
Hi, could you please share the RVol indicator (watchlist) you have based on the volume? What aggregation period we should use for the RVol watchlist column?@ezrollin Thanks Ez, i would like to have one decimal only ,instead on 4 or 5(ex. 4.2 instead of 4.2341)
@tomsk Thank You, very much appreciated. That's very nice of you, love this place.
My Final Adjustments with you guys helping, thanks to all. Shows RVOL, different colors based on values.
Code:plot c = Volume(period = AggregationPeriod.DAY) / Average(volume(period = AggregationPeriod.DAY), 20); c.SetDefaultColor(Color.BLACK); AssignBackgroundColor(if c > 7 then Color.Dark_Green else if c > 5 then Color.Green else if c > 3 then Color.Orange else if c > 2 then Color.Pink else Color.red); AddLabel(yes, AsText(c, NumberFormat.TWO_DECIMAL_PLACES) + "X", Color.Black);
Asking for help one more time, any help will be awesome. It works with volume instead of shares, but i want shares (as millions)
plot x = (shares);
AddLabel (yes, + Round(x * .000001, 1) + "M", Color.yellow);
def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1];
def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD());
def vol = if isRollover and beforeStart then volume else if beforeStart then vol[1] + volume else Double.NaN;
def PMV = if IsNaN(vol) then PMV[1] else vol;
def AV = AggregationPeriod.DAY;
def x = Average(Volume(period=AV)[1],60);
def y1 = Round((PMV/x),2);
def L = Lg(y1);
def p = if L>=1 then 0 else if L>=0 then 1 else 2;
def y2 = Round(y1,p);
plot z = y2;
z.assignValueColor(if z>=10 then color.CYAN else if z>=1 then createcolor(255,153,153) else createcolor(0,215,0));
hey ben, i am trying to convert this to my watchlist but it is not working. I have already transferred to script that changes color bases on the Rvol@DeusMecanicus Thank you. That was helpful!
def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1];
def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD());
def vol = if isRollover and beforeStart then volume else if beforeStart then vol[1] + volume else Double.NaN;
def PMV = if IsNaN(vol) then PMV[1] else vol;
def AV = AggregationPeriod.DAY;
def x = Average(Volume(period=AV)[1],60);
def y1 = Round((PMV/x),2);
def L = Lg(y1);
def p = if L>=1 then 0 else if L>=0 then 1 else 2;
def y2 = Round(y1,p);
plot z = y2;
z.assignValueColor(if z>=10 then color.CYAN else if z>=1 then createcolor(255,153,153) else createcolor(0,215,0));
plot c = Volume(period = AggregationPeriod.DAY) / Average(volume(period = AggregationPeriod.DAY), 63);
c.SetDefaultColor(Color.BLACK);
AssignBackgroundColor(if c > 20 then Color.BLUE
else if c > 10 then Color.DARK_GREEN
else if c > 8 then Color.GREEN
else if c > 6 then Color.LIGHT_GREEN
else if c > 4 then Color.LIME
else if c > 2 then Color.YELLOW
else if c > 1 then Color.PINK
else if c < 1 then Color.RED else Color.LIGHT_GRAY);
AddLabel(yes, AsText(c, NumberFormat.TWO_DECIMAL_PLACES) + "x", Color.Black);
I was reading this forum and I figured since I hadn't seen anyone respond to this, I might try.
declare lower;
declare zerobase;
input length = 50;
def currentVol = currentVol[1] + volume;
def avgVol = [I]Need help to find avg of last 20 days[/I]
plot currentVol / avgVol;
https://usethinkscript.com/threads/time-based-volume-indicator-for-thinkorswim.124/however, this gives the RVOL for the total day. What im trying to do is compare the RVOL up to a certain period of time. For ex if its 10 EST, I would want to compare the volume from 9:30-10 to the avg volume from 9:30-10:00 for the last 20 days.
input length = 21;
input offset = 1;
def ADV = Average(volume, length)[offset];
def rVol = volume /ADV;
# remove "#" infront of Addlabels to select prefer choice
AddLabel(yes, round(rVol,2));
#AddLabel(yes, asPercent(rVol));
AssignPriceColor(if rVol >= 1 then color.dark_red else if rVol <=.5 then Color.black else color.Gray);
def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1];
def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD());
def vol = if isRollover and beforeStart then volume else if beforeStart then vol[1] + volume else Double.NaN;
def PMV = if IsNaN(vol) then PMV[1] else vol;
def AV = AggregationPeriod.DAY;
def x = Average(Volume(period=AV)[1],60);
def y1 = Round((PMV/x),2);
def L = Lg(y1);
def p = if L>=1 then 0 else if L>=0 then 1 else 2;
def y2 = Round(y1,p);
plot z = y2;
z.assignValueColor(if z>=10 then color.CYAN else if z>=1 then createcolor(255,153,153) else createcolor(0,215,0));
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
S | Trade Ideas Intraday , single bar , Relative Volume RVOL For ThinkOrSwim | Indicators | 16 | |
N | Relative Strength RP Labels For ThinkOrSwim | Indicators | 35 | |
ARSI - Adaptive Relative Strength Index for ThinkorSwim | Indicators | 15 | ||
YungTrader's Relative Volume | Indicators | 17 | ||
Relative Vigor Index (RVI) for ThinkorSwim | Indicators | 6 |
Start a new thread and receive assistance from our community.
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.
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.