RicardoSantos

[RS]MA RSI V0

Request for NDBMFB: highlight of overbought / oversold levels on rsi ma's.
סקריפט קוד פתוח

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

כתב ויתור

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

רוצה להשתמש בסקריפ זה בגרף?
study(title="marsi", shorttitle="marsi", overlay=false)

basis = rsi(close, input(14))

ma1 = sma(basis, input(2))
ma2 = sma(basis, input(13))

oversold = input(30)
overbought = input(70)

plot(ma1, title="RSI MA1", color=teal)
plot(ma2, title="RSI MA2", style=circles, color=orange)

obhist = ma1 >= overbought ? ma1 : overbought
oshist = ma1 <= oversold ? ma1 : oversold

plot(obhist, title="Overbought Highligth", style=histogram, color=maroon, histbase=overbought)
plot(oshist, title="Oversold Highligth", style=histogram, color=green, histbase=oversold)

i1 = hline(oversold, title="Oversold Level", color=green)
i2 = hline(overbought, title="Overbought Level", color=maroon)

fill(i1, i2, color=olive, transp=70)

hline(50, title="50 Level", color=black)