//@version=4 study(title="Relative Vigor Index", shorttitle="RVGI", format=format.price, precision=4, resolution="") len = input(5, title="Length", minval=1) rvi = sum(swma(close-open), len)/sum(swma(high-low),len) sig = swma(rvi) offset = input(0, "Offset", type = input.integer, minval = -500, maxval = 500) crossoverBear = cross(rvi, sig) and rvi < sig ? avg(rvi, sig) : na crossoverBull = cross(rvi, sig) and rvi > sig ? avg(rvi, sig) : na plot(rvi, color=#008000, title="RVGI", offset = offset, linewidth = 2) plot(sig, color=#FF0000, title="Signal", offset = offset, linewidth = 2) alertcondition(crossoverBear, "Signal", "RVGI Bearish Trend") alertcondition(crossoverBull, "RVGI", "RVGI Bullish Trend") //@version=4 study("Weis Wave Volume", shorttitle="WWV", overlay=false, resolution="") method = input(defval="ATR", options=["ATR", "Traditional", "Part of Price"], title="Renko Assignment Method") methodvalue = input(defval=14.0, type=input.float, minval=0, title="Value") pricesource = input(defval="Close", options=["Close", "Open / Close", "High / Low"], title="Price Source") useClose = pricesource == "Close" useOpenClose = pricesource == "Open / Close" or useClose useTrueRange = input(defval="Auto", options=["Always", "Auto", "Never"], title="Use True Range instead of Volume") isOscillating = input(defval=false, type=input.bool, title="Oscillating") normalize = input(defval=false, type=input.bool, title="Normalize") vol = useTrueRange == "Always" or useTrueRange == "Auto" and na(volume) ? tr : volume op = useClose ? close : open hi = useOpenClose ? close >= op ? close : op : high lo = useOpenClose ? close <= op ? close : op : low if method == "ATR" methodvalue := atr(round(methodvalue)) if method == "Part of Price" methodvalue := close / methodvalue currclose = float(na) prevclose = nz(currclose[1]) prevhigh = prevclose + methodvalue prevlow = prevclose - methodvalue currclose := hi > prevhigh ? hi : lo < prevlow ? lo : prevclose direction = int(na) direction := currclose > prevclose ? 1 : currclose < prevclose ? -1 : nz(direction[1]) directionHasChanged = change(direction) != 0 directionIsUp = direction > 0 directionIsDown = direction < 0 barcount = 1 barcount := not directionHasChanged and normalize ? barcount[1] + barcount : barcount vol := not directionHasChanged ? vol[1] + vol : vol res = barcount > 1 ? vol / barcount : vol plot(isOscillating and directionIsDown ? -res : res, style=plot.style_columns, color=directionIsUp ? color.green : color.red, transp=75, linewidth=3, title="Wave Volume") // // @author iamaltcoin // // This KDJ indicator is a mimic of the same indicator on bitcoinwisdom // // This script is released free of charge with no warranty // Please leave a not to the author of this script if it is used // whole or in part // study("KDJ Indicator - @iamaltcoin", shorttitle="GM_V2_KDJ") ilong = input(9, title="period") isig = input(3, title="signal") bcwsma(s,l,m) => _s = s _l = l _m = m _bcwsma = (_m*_s+(_l-_m)*nz(_bcwsma[1]))/_l _bcwsma c = close h = highest(high, ilong) l = lowest(low,ilong) RSV = 100*((c-l)/(h-l)) pK = bcwsma(RSV, isig, 1) pD = bcwsma(pK, isig, 1) pJ = 3 * pK-2 * pD crossoverBear = cross(pJ, pK) and pJ < pK ? avg(pJ, pK) : na crossoverBull = cross(pJ, pK) and pJ > pK ? avg(pJ, pK) : na plot(pK, color=white, linewidth = 2, transp=0) plot(pD, color=red, linewidth = 2,transp=0 ) plot(pJ, color=green, linewidth = 2,transp=0) alertcondition(crossoverBear, "pK", "Bearish Trend") alertcondition(crossoverBull, "pJ", "Bullish Trend") bgcolor(pJ>pD? green : red, transp=70) //@version=5 indicator("Williams Percent Range", shorttitle="Williams %R", format=format.price, precision=2, timeframe="", timeframe_gaps=true) length = input(title="Length", defval=14) src = input(close, "Source") _pr(length) => max = ta.highest(length) min = ta.lowest(length) 100 * (src - max) / (max - min) percentR = _pr(length) obPlot = hline(-20, title="Upper Band", color=#787B86) hline(-50, title="Middle Level", linestyle=hline.style_dotted, color=#787B86) osPlot = hline(-80, title="Lower Band", color=#787B86) fill(obPlot, osPlot, title="Background", color=color.rgb(126, 87, 194, 90)) plot(percentR, title="%R", color=#7E57C2)