Risto Benji
New member
Hey guys, not new to the site but just registered. This site has been a great resource as I have been lurking, much thanks to those who contribute to its success. As the title suggests, I'm wondering if anyone with knowledge of Tradingview code can port this indicator...... Thanks in advance.
Link to the indicator details
Code:
//Written by Umur Ozkul
//@version=3
study(title="Volume Impact", shorttitle="UO_VI")
TrigLen = input(7, minval=1)
FastX = input(34, minval=1)
SlowX = input(55, minval=1)
hline(0, color=gray, linestyle=line)
xTrend = iff(hlc3 > hlc3[1], volume * 100, -volume * 100)
xFast = ema(xTrend, FastX)
xSlow = ema(xTrend, SlowX)
xKVO = xFast - xSlow
xTrigger = ema(xKVO, TrigLen)
p = close - close[1]
pTrigger = ema(p, TrigLen)
volumeImpact = (xKVO - xTrigger)*1.2
buyColor=green
sellColor=red
xDirection = xTrigger - xTrigger[1]
pDirection = pTrigger - pTrigger[1]
buyit=1
sellit=-1
donothing=0
suggestion = (volumeImpact - volumeImpact[1]) > 0 ? buyit : sellit
paint=suggestion
impactColor= paint==buyit ? green : paint==sellit ? red : gray
plot(volumeImpact, color=impactColor, style=area, title="KVO")
triggerColor = xTrigger>=0 ? green : red
plot(xTrigger, linewidth=4, color=triggerColor, title="Trigger")
//barColor
//triggerColor
kvoColor = xKVO >= 0 ? green : red
impactFlipColor = volumeImpact >= 0 ? green : red
plot(xKVO, title="KVO")
priceColorOpt = input(title="Bar Color", defval="Impact>0", options=["Default", "KVO,Impact Direction", "Impact>0", "Trigger>0", "KVO>0"])
priceColor0 = priceColorOpt == "Default" ? na : priceColorOpt == "KVO,Impact Direction" ? impactColor : priceColorOpt=="Impact>0"? impactFlipColor : priceColorOpt == "Trigger>0" ? triggerColor : kvoColor
priceColor = priceColor0 == green ? lime : orange
//priceColor = close > open and priceColor0 == green or close < open and priceColor0 == red ? priceColor1 : na
barcolor(priceColor)
Link to the indicator details
Last edited by a moderator: