RSI-VWAP Indicator for ThinkorSwim

@germanburrito @astro_phx
Thanks for a great indicator and all the feedback strategy to both!!
Best Regards!
mdtn
thank you @germanburrito it is working now. here how I use it. I use vwap on an upper study with slim ribbon and ichimoku kijun for profit booking or stop loss on the lower studies I use macd_BB and the study discussed here rsivwap (length 13 and smooth 21 and now length2=8)
1. entry short when price below vwap and rsivwap in red cloud take profit when macd_BB turn green.
2. entry long when price above vwap and rsivwap in green cloud take profit when macd_BB turns red.

i hope i explained it right. I am attaching image to show how it look.

 
Why this indicator can not use on SPX and NDX? But I can make it work on other symbols: SPY, QQQ, AAPL, BAC, etc.
 
Can you please share the chart setup ?
Did you know that by clicking on a member's name, you can easily check when they were last seen on the uTS forum?

It's a great way to keep track of who's been around recently, and who hasn't.

Speaking of which, if your question directed toward the OP, @germanburrito, it looks like he is no longer active. :(

Therefore, the scripts that he shared in this thread, are all that is available.
 
Last edited:
Hello German, When I Plotted your indicator , I didn't get the RED & Green MA ? So I added a simple 3 per smoothing of the hl2 value of the RSI

I also took out your ratio for the Dev Channels and added a 1 st dev channel, added clouds this is my amended version
Code:
declare lower;

input length = 14;
input price = close;
input averageType = AverageType.simple;
Input smooth = 3;
DefineGlobalColor("RisingMA", color.uptick);
DefineGlobalColor("FallingMA", color.downtick);

def NetChgAvg = MovingAverage(averageType, price - price[1], length);
def TotChgAvg = MovingAverage(averageType, AbsValue(price - price[1]), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

def RSI = 50 * (ChgRatio + 1);

def o = (RSI + RSI[1]) / 2;

def h = Max(RSI, RSI[1]);

def l = Min(RSI, RSI[1]);

def c = RSI;

def hl2 = (h+l)/2;
Plot RSPlain = hl2;
RSPlain.SetPaintingStrategy(PaintingStrategy.Line);
RSPlain.SetLineWeight(2);
RSPlain.AssignValueColor( if RSPlain>RSPlain[1] then GlobalColor("RisingMa") else GlobalColor("FallingMa"));
Plot RSAVG = MovingAverage(averageType,hl2,Smooth);
RSAvg.SetPaintingStrategy(PaintingStrategy.Line);
RSAvg.SetLineWeight(2);
RSAvg.AssignValueColor( if RSAvg>RSAvg[1] then GlobalColor("RisingMa") else GlobalColor("FallingMa"));
AddCloud(RSPlain,RSAvg,GlobalColor("RisingMA"),GlobalColor("FallingMA"));
AddChart(high = h, low = l, open = o, close = c, type = ChartType.CANDLE, Color.WHITE);
input charttype = ChartType.CANDLE;

def Data = BarNumber();
input Number_Of_Bar = 1;

def bar =  Data >= Number_Of_Bar;
def pv = if bar then pv[1] + hl2 * volume else 0;
def cumvolume = if bar then cumvolume[1] + volume else 0;
plot vw = pv / cumvolume;
def bars = Data - Number_Of_Bar;
def sample = if bar then sample[1] + Sqr(hl2 - vw) else 0;
def var = sample / bars;
def dev = Sqrt(var);

plot Udev1 =  vw + (dev * 1);
plot Ldev1 = vw - (dev * 1);
plot Udev2 =  vw + (dev * 2);
plot Ldev2 = vw - (dev * 2);

#vw.setdefaultColor(color.yellow);
Udev1.SetDefaultColor(Color.Yellow);
Udev2.SetDefaultColor(Color.Yellow);
Udev1.SetPaintingStrategy(PaintingStrategy.dashes);
Udev2.SetPaintingStrategy(PaintingStrategy.dashes);
Udev1.Setlineweight(1);
Udev2.Setlineweight(1);
Ldev1.SetDefaultColor(Color.Yellow);
Ldev2.SetDefaultColor(Color.Yellow);
Ldev1.SetPaintingStrategy(PaintingStrategy.dashes);
Ldev2.SetPaintingStrategy(PaintingStrategy.dashes);
Ldev1.Setlineweight(1);
Ldev2.Setlineweight(1);
vw.SetLineWeight(3);
vw.AssignValueColor(if rsi > vw
                           then color.light_GREEN
                           else color.light_RED);
[/CODE
[QUOTE="germanburrito, post: 50509, member: 7382"]
In honor of GME going to 300 I'm sharing a script that uses the RSI instead of price for the VWAP. I use it on the today 5 minute graph if anyone knows how to set it up daily, weekly or monthly it would be great.

[ATTACH type="full" alt="Mdr7RZp.png"]9258[/ATTACH]

[CODE]declare lower;

input length = 14;
input price = close;
input averageType = AverageType.simple;
input ratio = 2.236;
DefineGlobalColor("RisingMA", color.uptick);
DefineGlobalColor("FallingMA", color.downtick);

def NetChgAvg = MovingAverage(averageType, price - price[1], length);
def TotChgAvg = MovingAverage(averageType, AbsValue(price - price[1]), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

def RSI = 50 * (ChgRatio + 1);


def o = (RSI + RSI[1]) / 2;

def h = Max(RSI, RSI[1]);

def l = Min(RSI, RSI[1]);

def c = RSI;

def hl2 = (h+l)/2;
AddChart(high = h, low = l, open = o, close = c, type = ChartType.CANDLE, Color.WHITE);
input charttype = ChartType.CANDLE;


def Data = BarNumber();
input Number_Of_Bar = 1;

def bar =  Data >= Number_Of_Bar;
def pv = if bar then pv[1] + hl2 * volume else 0;
def cumvolume = if bar then cumvolume[1] + volume else 0;
plot vw = pv / cumvolume;
def bars = Data - Number_Of_Bar;
def sample = if bar then sample[1] + Sqr(hl2 - vw) else 0;
def var = sample / bars;
def dev = Sqrt(var);

plot dev1 =  vw + (dev * ratio);
plot dev2 = vw - (dev * ratio);

vw.setdefaultColor(color.yellow);
dev1.SetDefaultColor(Color.White);
dev2.SetDefaultColor(Color.White);


dev1.Setlineweight(2);
dev2.Setlineweight(2);


vw.SetLineWeight(3);
#vw.AssignValueColor(if rsi > vw
                           #then color.light_GREEN
                           #else color.light_RED);
code error any help appreciated thanks i got yours to work the error is on @germanburrito , if anyone can help thanks
1703348915509.png

[/QUOTE]
 
Last edited:

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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