Harigami
ログイン
LC23 タイトルなし
No License Python
コピー
study("4priceaction", overlay=true)

pctP = input(60, minval=1, maxval=99, title="ピンバー逆方向の髭割合")
pblb = input(10, minval=1, maxval=100, title="ピンバーの期間")
pctS = input(5, minval=1, maxval=99, title="坊主逆方向への髭割合")
spb = input(true, title="ピンバー")
ssb = input(true, title="坊主")
sib = input(false, title="はらみ足")
sob = input(false, 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)
barcolor(pBarDn() ? red : na)
plotshape(pBarUp(),title="LONG",style=shape.triangleup,text="PB",color=blue,textcolor=blue,location=location.belowbar)
plotshape(pBarDn(),title="SHORT",style=shape.triangledown,text="PB",color=red,textcolor=red,location=location.abovebar)
//Shaved Bars
barcolor(sBarDown() ? fuchsia : na)
barcolor(sBarUp() ? aqua : na)
plotshape(sBarUp(),title="LONG",style=shape.triangleup,text="SB",color=blue,textcolor=blue,location=location.belowbar)
plotshape(sBarDown(),title="SHORT",style=shape.triangledown,text="SB",color=red,textcolor=red,location=location.abovebar)
//Inside and Outside Bars
barcolor(insideBar() ? yellow : na )
barcolor(outsideBar() ? orange : na )
plotshape(insideBar(),title="LONG",style=shape.triangleup,text="ISB",color=purple,textcolor=purple,location=location.belowbar)
plotshape(outsideBar(),title="SHORT",style=shape.triangledown,text="OSB",color=purple,textcolor=purple,location=location.abovebar)
study("4priceaction", overlay=true)

pctP = input(60, minval=1, maxval=99, title="ピンバー逆方向の髭割合")
pblb = input(10, minval=1, maxval=100, title="ピンバーの期間")
pctS = input(5, minval=1, maxval=99, title="坊主逆方向への髭割合")
spb = input(true, title="ピンバー")
ssb = input(true, title="坊主")
sib = input(false, title="はらみ足")
sob = input(false, 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)
barcolor(pBarDn() ? red : na)
plotshape(pBarUp(),title="LONG",style=shape.triangleup,text="PB",color=blue,textcolor=blue,location=location.belowbar)
plotshape(pBarDn(),title="SHORT",style=shape.triangledown,text="PB",color=red,textcolor=red,location=location.abovebar)
//Shaved Bars
barcolor(sBarDown() ? fuchsia : na)
barcolor(sBarUp() ? aqua : na)
plotshape(sBarUp(),title="LONG",style=shape.triangleup,text="SB",color=blue,textcolor=blue,location=location.belowbar)
plotshape(sBarDown(),title="SHORT",style=shape.triangledown,text="SB",color=red,textcolor=red,location=location.abovebar)
//Inside and Outside Bars
barcolor(insideBar() ? yellow : na )
barcolor(outsideBar() ? orange : na )
plotshape(insideBar(),title="LONG",style=shape.triangleup,text="ISB",color=purple,textcolor=purple,location=location.belowbar)
plotshape(outsideBar(),title="SHORT",style=shape.triangledown,text="OSB",color=purple,textcolor=purple,location=location.abovebar)
コンソール
現在、コメントはありません。
最初のコメンターになりませんか?