@germanburrito Appreciate your response. The indicator is really helpful and gonna do more testing
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
@everyone @germanburrito can we scan for when candles closed above or below the yellow line?
close is greater than vw
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.
Indices do not have volume.Why this indicator can not use on SPX and NDX? But I can make it work on other symbols: SPY, QQQ, AAPL, BAC, etc.
Did you know that by clicking on a member's name, you can easily check when they were last seen on the uTS forum?Can you please share the chart setup ?
code error any help appreciated thanks i got yours to work the error is on @germanburrito , if anyone can help thanksHello 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);
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.