RicardoSantos

[RS]Temporal Extrapolated Volume Rate Of Power V0

EXPERIMENTAL: method to read volume rate of power from extrapolated volume from moving price.
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
study(title="[RS]Temporal Extrapolated Volume Rate Of Power V0", shorttitle="[RS]TEV.ROP.V0", overlay=false)
tf = input("1")
tf_period = input(60)
use_ha = input(false)
normalize_volume = input(false)

tv = sum(high-low, tf_period)
nv = sum(close < open ? open-close : 0, tf_period)
pv = sum(close > open ? close-open : 0, tf_period)

tv_s = use_ha ? security(heikenashi(tickerid), tf, tv) : security(tickerid, tf, tv)
nv_s = use_ha ? security(heikenashi(tickerid), tf, nv) : security(tickerid, tf, nv)
pv_s = use_ha ? security(heikenashi(tickerid), tf, pv) : security(tickerid, tf, pv)

normalized_volume = normalize_volume ? sum(tv_s, 100)/100 : tv_s

bull_power = pv_s > nv_s ? (pv_s/normalized_volume)*100 : 0
bear_power = pv_s < nv_s ? (nv_s/normalized_volume)*100 : 0

reversal_alert = pv_s > nv_s ? (nv_s/normalized_volume)*100 : nv_s > pv_s ? (pv_s/normalized_volume)*100 : 0
//reversal_alert = pv_s > nv_s ? (nv_s/(tv_s-pv_s))*100 : nv_s > pv_s ? (pv_s/(tv_s-nv_s))*100 : 0
plot(reversal_alert, style=line, color=black, linewidth=2)
plot(bear_power, style=columns, color=maroon)
plot(bull_power, style=columns, color=green)

hline(0)
hline(50)
hline(100)

isBull()=>bull_power > reversal_alert
isBear()=>bear_power > reversal_alert
noResistance()=>reversal_alert <= 5
isResistanceRising()=>rising(reversal_alert, 2) and reversal_alert > 5
isResistancefalling()=>falling(reversal_alert, 2)

barColorCondition = isBull() and noResistance() ? green :
        isBull() and isResistanceRising() ? olive :
        isBear() and noResistance() ? maroon :
        isBear() and isResistanceRising() ? orange :
        bull_power > reversal_alert ? lime :
        bear_power > reversal_alert ? red : yellow
showBarColor = input(true)
barcolor(not showBarColor ? na : barColorCondition)