Andrei_Serdiuk

Triple Bollinger Bands

Bollinger Bands with three standard deviations
סקריפט קוד פתוח

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

כתב ויתור

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

רוצה להשתמש בסקריפ זה בגרף?
study(title = "Triple Bollinger Bands", shorttitle="Triple BB", overlay=true)
source = close
length = input(20, minval=20, maxval=50)
stdDev1 = input(1.0, minval=1.0, maxval=1.3)
stdDev2 = input(2.0, minval=2.0, maxval=2.3)
stdDev3 = input(3.0, minval=3.0, maxval=3.3)

basis = sma(source, length)
dev1 = stdDev1 * stdev(source, length)
dev2 = stdDev2 * stdev(source, length)
dev3 = stdDev3 * stdev(source, length)

upper1 = basis + dev1
lower1 = basis - dev1
upper2 = basis + dev2
lower2 = basis - dev2
upper3 = basis + dev3
lower3 = basis - dev3

plot(basis, color=yellow)
p1 = plot(upper1, color=blue)
p2 = plot(lower1, color=blue)
p3 = plot(upper2, color=aqua)
p4 = plot(lower2, color=aqua)
p5 = plot(upper3, color=red)
p6 = plot(lower3, color=red)