RicardoSantos

[RS]RSIC - Oscilator Bands V0

EXPERIMENTAL: stashed and forgotten :p , forgot to publish this one.
untill recently was asked about it because it was used on another script :D
usage similar to how to read a rsi.
סקריפט קוד פתוח

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

כתב ויתור

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

רוצה להשתמש בסקריפ זה בגרף?
// @author RicardoSantos
// RSI inspired oscilator bands channels.
// Can be interpreted as a RSI oscilator but at price level.
study(title="[RS]RSIC - Oscilator Bands V0", shorttitle="[RS]RSIC.V0", overlay=true)
lenght = input(3)
margin = input(4)

tf = margin
mp = (0.0001 * close) * margin

ph = avg(high, high[tf])
ph2 = wma((ph+mp)+(high-hl2), lenght*3)
pl = avg(low, low[tf])
pl2 = wma((pl-mp)-(low-hl2), lenght*3)

ma1 = alma((
    close >= ph[1] ? high + high - ph + mp :
    close <= pl[1] ? low - low + pl - mp :
    hlc3), lenght, 0.55, 6)

pu = plot(ph2, style=cross, color=silver, linewidth=0)
pd = plot(pl2,style=cross, color=silver, linewidth=0)
pc = plot(ma1, style=line, color=silver, linewidth=1)

fill(pu,pc, color=red, transp=80)
fill(pd,pc, color=green, transp=80)