Harigami
ログイン
LC23 タイトルなし
No License Python
コピー
//@version=3
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)

EMAorSMA = input(title="平均線の選択", defval="SMA", options=["SMA", "EMA"])
FAST= input(title="FASTMA", type=integer, defval=20, minval=1, maxval=10000)
SLOW = input(title="SLOWMA", type=integer, defval=75, minval=1, maxval=10000)
ma_1 = input(title="MA1", type=integer, defval=5, minval=1, maxval=10000)
ma_2 = input(title="MA2", type=integer, defval=14, minval=1, maxval=10000)
ma_3 = input(title="MA3", type=integer, defval=200, minval=1, maxval=10000)
ma_4 = input(title="MA4", type=integer, defval=320, minval=1, maxval=10000)
ma_5 = input(title="MA5", type=integer, defval=1200, minval=1, maxval=10000)
FASTMA = EMAorSMA == "EMA" ? ema(close, FAST) : sma(close, FAST)
SLOWMA = EMAorSMA == "EMA" ? ema(close, SLOW) : sma(close, SLOW)
ma1 = EMAorSMA == "EMA" ? ema(close, ma_1) : sma(close, ma_1)
ma2 = EMAorSMA == "EMA" ? ema(close, ma_2) : sma(close, ma_2)
ma3 = EMAorSMA == "EMA" ? ema(close, ma_3) : sma(close, ma_3)
ma4 = EMAorSMA == "EMA" ? ema(close, ma_4) : sma(close, ma_4)
ma5 = EMAorSMA == "EMA" ? ema(close, ma_5) : sma(close, ma_5)
ec = FASTMA > SLOWMA ? lime:red
plot(FASTMA, color=ec, linewidth=2)
plot(SLOWMA, color=ec, linewidth=2)
fill(plot(FASTMA), plot(SLOWMA), color = ec)
plot(ma1, color=aqua)
plot(ma2, color=yellow)
plot(ma3, color=blue)
plot(ma4, color=white)
plot(ma5, color=purple)

//@version=3
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)

EMAorSMA = input(title="平均線の選択", defval="SMA", options=["SMA", "EMA"])
FAST= input(title="FASTMA", type=integer, defval=20, minval=1, maxval=10000)
SLOW = input(title="SLOWMA", type=integer, defval=75, minval=1, maxval=10000)
ma_1 = input(title="MA1", type=integer, defval=5, minval=1, maxval=10000)
ma_2 = input(title="MA2", type=integer, defval=14, minval=1, maxval=10000)
ma_3 = input(title="MA3", type=integer, defval=200, minval=1, maxval=10000)
ma_4 = input(title="MA4", type=integer, defval=320, minval=1, maxval=10000)
ma_5 = input(title="MA5", type=integer, defval=1200, minval=1, maxval=10000)
FASTMA = EMAorSMA == "EMA" ? ema(close, FAST) : sma(close, FAST)
SLOWMA = EMAorSMA == "EMA" ? ema(close, SLOW) : sma(close, SLOW)
ma1 = EMAorSMA == "EMA" ? ema(close, ma_1) : sma(close, ma_1)
ma2 = EMAorSMA == "EMA" ? ema(close, ma_2) : sma(close, ma_2)
ma3 = EMAorSMA == "EMA" ? ema(close, ma_3) : sma(close, ma_3)
ma4 = EMAorSMA == "EMA" ? ema(close, ma_4) : sma(close, ma_4)
ma5 = EMAorSMA == "EMA" ? ema(close, ma_5) : sma(close, ma_5)
ec = FASTMA > SLOWMA ? lime:red
plot(FASTMA, color=ec, linewidth=2)
plot(SLOWMA, color=ec, linewidth=2)
fill(plot(FASTMA), plot(SLOWMA), color = ec)
plot(ma1, color=aqua)
plot(ma2, color=yellow)
plot(ma3, color=blue)
plot(ma4, color=white)
plot(ma5, color=purple)

コンソール
現在、コメントはありません。
最初のコメンターになりませんか?