Harigami
ログイン
pk-hangjing タイトルなし
No License Python
コピー
study("EMA/SMA MTF BAND and PRICEACTION", overlay=true)
//Maband
A2 = security(tickerid, "1", sma(close, 100))//title='SMA5M'
B2 = security(tickerid, "1", sma(close, 300))//title='SMA15M'
C2 = security(tickerid, "1", sma(close, 600))//title='SMA30M'
D2 = security(tickerid, "1", sma(close, 1200))//title='SMA1H'
E2 = security(tickerid, "1", sma(close, 4800))//title='SMA4H'
A3 = security(tickerid, "1", ema(close, 100))//title='EMA5M'
B3 = security(tickerid, "1", ema(close, 300))//title='EMA15M'
C3 = security(tickerid, "1", ema(close, 600))//title='EMA30M'
D3 = security(tickerid, "1", ema(close, 1200))//title='EMA1H'
E3 = security(tickerid, "1", ema(close, 4800))//title='EMA4H'
//Mabandcolor
AL=plot(A2 , title='5MSMA', color=yellow,linewidth=1,transp=98)
BL=plot(A3 , title='5MEMA', color=yellow, linewidth=1,transp=98)
CL=plot(B2 , title='15MSMA', color=aqua, linewidth=1,transp=98)
DL=plot(B3 , title='15MEMA', color=aqua, linewidth=1,transp=98)
EL=plot(C2 , title='30MSMA', color=orange, linewidth=1,transp=98)
FL=plot(C3 , title='30MEMA', color=orange, linewidth=1,transp=98)
GL=plot(D2 , title='1HSMA', color=lime, linewidth=1,transp=98)
HL=plot(D3 , title='1HSMA', color=lime, linewidth=1,transp=98)
IL=plot(E2 , title='4HSMA', color=red, linewidth=1,transp=98)
JL=plot(E3 , title='4HEMA', color=red, linewidth=1,transp=98)
fill(AL,BL , title='5MBAND',color=yellow,transp=70)
fill(CL,DL , title='15MBAND',color=aqua,transp=70)
fill(EL,FL , title='30MBAND',color=orange,transp=70)
fill(GL,HL , title='1HBAND',color=lime,transp=70)
fill(IL,JL , title='4HBAND',color=red,transp=70)
//Priceaction
pctP = input(60, minval=1, maxval=99, title="カラカサ/トンカチの設定値")
pblb = input(2, minval=1, maxval=100, title="カラカサ/トンカチの期間")
pctS = input(5, minval=1, maxval=99, title="坊主の設定値")
spb = input(true, title="カラカサ/トンカチ")
ssb = input(true, title="坊主")
sib = input(true, title="はらみ足")
sob = input(true, title="包み足")
//PBar Percentages
pctCp = pctP * .01
pctCPO = 1 - pctCp
//Shaved Bars Percentages
pctCs = pctS * .01
pctSPO = pctCs
range = high - low
///PinBars
pBarUp() => spb and open > high - (range * pctCPO) and close > high - (range * pctCPO) and low <= lowest(pblb) ? 1 : 0
pBarDn() => spb and open < high - (range *  pctCp) and close < high-(range * pctCp) and high >= highest(pblb) ? 1 : 0
//Shaved Bars
sBarUp() => ssb and (close >= (high - (range * pctCs)))
sBarDown() => ssb and close <= (low + (range * pctCs))
//Inside Bars
insideBar() => sib and high <= high[1] and low >= low[1] ? 1 : 0
outsideBar() => sob and (high > high[1] and low < low[1]) ? 1 : 0
//PinBars
barcolor(pBarUp() ? lime : na,title="カラカサ/トンカチ上")
barcolor(pBarDn() ? red : na,title="カラカサ/トンカチ下")
plotshape(pBarUp(),title="カラカサ/トンカチ上2",style=shape.triangleup,text="PB",color=blue,textcolor=blue,location=location.belowbar)
plotshape(pBarDn(),title="カラカサ/トンカチ下2",style=shape.triangledown,text="PB",color=red,textcolor=red,location=location.abovebar)
//Shaved Bars
plotshape(sBarUp(),title="坊主上",style=shape.triangleup,color=aqua,location=location.belowbar)
plotshape(sBarDown(),title="坊主下",style=shape.triangledown,color=purple,location=location.abovebar)
//Inside and Outside Bars
barcolor(insideBar() ? yellow : na ,title="はらみ足")
barcolor(outsideBar() ? orange : na ,title="包み足")
//Alert
alertcondition(pBarUp() , title = "PU", message = "↑")
alertcondition(pBarDn() , title = "PD", message = "↓")
alertcondition(sBarUp() , title = "SU", message = "↑")
alertcondition(sBarDown() , title = "SD", message = "↓")
alertcondition(insideBar() , title = "IB", message = "転換")
alertcondition(outsideBar() , title = "OB", message = "転換")
study("EMA/SMA MTF BAND and PRICEACTION", overlay=true)
//Maband
A2 = security(tickerid, "1", sma(close, 100))//title='SMA5M'
B2 = security(tickerid, "1", sma(close, 300))//title='SMA15M'
C2 = security(tickerid, "1", sma(close, 600))//title='SMA30M'
D2 = security(tickerid, "1", sma(close, 1200))//title='SMA1H'
E2 = security(tickerid, "1", sma(close, 4800))//title='SMA4H'
A3 = security(tickerid, "1", ema(close, 100))//title='EMA5M'
B3 = security(tickerid, "1", ema(close, 300))//title='EMA15M'
C3 = security(tickerid, "1", ema(close, 600))//title='EMA30M'
D3 = security(tickerid, "1", ema(close, 1200))//title='EMA1H'
E3 = security(tickerid, "1", ema(close, 4800))//title='EMA4H'
//Mabandcolor
AL=plot(A2 , title='5MSMA', color=yellow,linewidth=1,transp=98)
BL=plot(A3 , title='5MEMA', color=yellow, linewidth=1,transp=98)
CL=plot(B2 , title='15MSMA', color=aqua, linewidth=1,transp=98)
DL=plot(B3 , title='15MEMA', color=aqua, linewidth=1,transp=98)
EL=plot(C2 , title='30MSMA', color=orange, linewidth=1,transp=98)
FL=plot(C3 , title='30MEMA', color=orange, linewidth=1,transp=98)
GL=plot(D2 , title='1HSMA', color=lime, linewidth=1,transp=98)
HL=plot(D3 , title='1HSMA', color=lime, linewidth=1,transp=98)
IL=plot(E2 , title='4HSMA', color=red, linewidth=1,transp=98)
JL=plot(E3 , title='4HEMA', color=red, linewidth=1,transp=98)
fill(AL,BL , title='5MBAND',color=yellow,transp=70)
fill(CL,DL , title='15MBAND',color=aqua,transp=70)
fill(EL,FL , title='30MBAND',color=orange,transp=70)
fill(GL,HL , title='1HBAND',color=lime,transp=70)
fill(IL,JL , title='4HBAND',color=red,transp=70)
//Priceaction
pctP = input(60, minval=1, maxval=99, title="カラカサ/トンカチの設定値")
pblb = input(2, minval=1, maxval=100, title="カラカサ/トンカチの期間")
pctS = input(5, minval=1, maxval=99, title="坊主の設定値")
spb = input(true, title="カラカサ/トンカチ")
ssb = input(true, title="坊主")
sib = input(true, title="はらみ足")
sob = input(true, title="包み足")
//PBar Percentages
pctCp = pctP * .01
pctCPO = 1 - pctCp
//Shaved Bars Percentages
pctCs = pctS * .01
pctSPO = pctCs
range = high - low
///PinBars
pBarUp() => spb and open > high - (range * pctCPO) and close > high - (range * pctCPO) and low <= lowest(pblb) ? 1 : 0
pBarDn() => spb and open < high - (range *  pctCp) and close < high-(range * pctCp) and high >= highest(pblb) ? 1 : 0
//Shaved Bars
sBarUp() => ssb and (close >= (high - (range * pctCs)))
sBarDown() => ssb and close <= (low + (range * pctCs))
//Inside Bars
insideBar() => sib and high <= high[1] and low >= low[1] ? 1 : 0
outsideBar() => sob and (high > high[1] and low < low[1]) ? 1 : 0
//PinBars
barcolor(pBarUp() ? lime : na,title="カラカサ/トンカチ上")
barcolor(pBarDn() ? red : na,title="カラカサ/トンカチ下")
plotshape(pBarUp(),title="カラカサ/トンカチ上2",style=shape.triangleup,text="PB",color=blue,textcolor=blue,location=location.belowbar)
plotshape(pBarDn(),title="カラカサ/トンカチ下2",style=shape.triangledown,text="PB",color=red,textcolor=red,location=location.abovebar)
//Shaved Bars
plotshape(sBarUp(),title="坊主上",style=shape.triangleup,color=aqua,location=location.belowbar)
plotshape(sBarDown(),title="坊主下",style=shape.triangledown,color=purple,location=location.abovebar)
//Inside and Outside Bars
barcolor(insideBar() ? yellow : na ,title="はらみ足")
barcolor(outsideBar() ? orange : na ,title="包み足")
//Alert
alertcondition(pBarUp() , title = "PU", message = "↑")
alertcondition(pBarDn() , title = "PD", message = "↓")
alertcondition(sBarUp() , title = "SU", message = "↑")
alertcondition(sBarDown() , title = "SD", message = "↓")
alertcondition(insideBar() , title = "IB", message = "転換")
alertcondition(outsideBar() , title = "OB", message = "転換")
コンソール
現在、コメントはありません。
最初のコメンターになりませんか?