RicardoSantos

[RS]Temporal Extrapolated Volume Rate Of Power V0

EXPERIMENTAL: method to read volume rate of power from extrapolated volume from moving price.
סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?
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)