2019-08-31 15:00:02 UNSELECTED

Unknown type code

Copy Copied! Full
//@version=3 study(title="MTF Bollinger Bands", shorttitle="MTF 3 BB", overlay=true) onoffA = input(true, "BB1 ON/OFF") resA = input(title='BB1時間足 (BB1 Time Frame)', type=resolution, defval="60") sigmaA = input(1,title='BB1偏差 (BB1 Sigma)', step=1, minval=1, maxval=3) onoffB = input(true, "BB2 ON/OFF") resB = input(title='BB2時間足 (BB1 Time Frame)', type=resolution, defval="60") sigmaB = input(2,title='BB2偏差 (BB2 Sigma)', step=1, minval=1, maxval=3) onoffC = input(true, "BB3 ON/OFF") resC = input(title='BB4時間足 (BB1 Time Frame)', type=resolution, defval="60") sigmaC = input(3,title='BB3偏差 (BB3 Sigma)', step=1, minval=1, maxval=3) devA = security(tickerid, resA, stdev(close,20)) basisA = security(tickerid, resA, sma(close,20)) devB = security(tickerid, resB, stdev(close,20)) basisB = security(tickerid, resB, sma(close,20)) devC = security(tickerid, resC, stdev(close,20)) basisC = security(tickerid, resC, sma(close,20)) upper_1 = onoffA ? (basisA + devA * sigmaA) : na lower_1 = onoffA ? (basisA - devA * sigmaA) : na upper_2 = onoffB ? (basisB + devB * sigmaB) : na lower_2 = onoffB ? (basisB - devB * sigmaB) : na upper_3 = onoffC ? (basisC + devC * sigmaC) : na lower_3 = onoffC ? (basisC - devC * sigmaC) : na plot(basisA, color=red,title='BB1 Basis') plot(basisB, color=orange,title='BB2 Basis') plot(basisC, color=red,title='BB3 Basis') u1 = plot(upper_1, color=blue,title='BB1 Upper') l1 = plot(lower_1, color=blue,title='BB1 Lower') u2 = plot(upper_2, color=green,title='BB2 Upper') l2 = plot(lower_2, color=green,title='BB2 Lower') u3 = plot(upper_3, color=purple,title='BB3 Upper') l3 = plot(lower_3, color=purple,title='BB3 Lower') fill(u1,l1, color=white, transp=90,title='BB1') fill(u2,l2, color=white, transp=90,title='BB2') fill(u3,l3, color=white, transp=90,title='BB3')
RECOMMEND