スポンサーサイト

--/--/-- --

上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

RCI3lines+TripleTimeframe

2018/04/18 Wed

//
// @author Jadbrother modified by madoqa
//
//@version=2
study(title = "RCI3lines+TripleTimeframe", shorttitle = "RCI3linesTTF")

itvs = input(9, "short interval")
itvm = input(36, "middle interval")
itvl = input(52, "long interval")
src = input(close, "source")
useCurrentRes = input(false, title="Use Current Chart Resolution?")
ssRCI = input(true, title="Show Ex RSI?")
resCustom = input(title="Use Different Timeframe? Uncheck Box Above", type=resolution, defval="30")
useCurrentRes2 = input(false, title="Use 2nd RCI Plot On Samet Timeframe?")
resCustom2 = input(title="Use 2nd RCI? Check Box Above", type=resolution, defval="15")
ssRCI2 = input(true, title="Show 2ndd RCI?")
useCurrentRes3 = input(false, title="Use 3rd RCI Plot On Samet Timeframe?")
resCustom3 = input(title="Use 3rd RCI? Check Box Above", type=resolution, defval="5")
ssRCI3 = input(true, title="Show 3rd RCI?")
upperband=input(title="High line[%]",defval=80,type=integer)
lowerband=input(title="Low line[%]",defval=-80,type=integer)

res = useCurrentRes ? period : resCustom
res2 = useCurrentRes2 ? period : resCustom2
res3 = useCurrentRes3 ? period : resCustom3

ord(seq, idx, itv) =>
     p = seq[idx]
    o = 1
    for i = 0 to itv - 1
        if p < seq[i]
            o := o + 1
    o

d(itv) =>
    sum = 0.0
    for i = 0 to itv - 1
        sum := sum + pow((i + 1) - ord(src, i, itv), 2)
    sum

rci(itv) => (1.0 - 6.0 * d(itv) / (itv * (itv * itv - 1.0))) * 100.0

outRCI = security(tickerid, res, rci(itvs))
outRCI2 = security(tickerid, res2, rci(itvs))
outRCI3 = security(tickerid, res3, rci(itvs))
hline(upperband,color=gray,linestyle=dashed)
hline(lowerband,color=gray,linestyle=dashed)
plot(rci(itvs), title = "RCI short",linewidth=3, color = red)
plot(rci(itvm), title = "RCI middle",linewidth=3, color = blue)
plot(rci(itvl), title = "RCI long",linewidth=3, color = lime)
plot(outRCI, title = "RCI S1", linewidth=2, color = aqua)
plot(ssRCI and outRCI2 ? outRCI2 : na, title = "RCI S2", linewidth=2, color = yellow)
plot(ssRCI2 and outRCI3 ? outRCI3 : na, title = "RCI S3", linewidth=2, color = fuchsia)
スポンサーサイト

CM_Ultimate RSI TTF

2018/04/16 Mon

//Created By ChrisMoody on 8/15/2014
//Triple Timeframe Modified By madoqa on 4/16/2018
///RSI with ability to change first RSI to a different Timeframe.
//option to Plot 2nd/3rd RSI to show different Timeframes on same chart

study(title="CM_Ultimate RSI tTF", shorttitle="CM_Ult_RSI_tTF", precision=0)
src = close
len = input(14, minval=1, title="Length")
upLine = input(70, minval=50, maxval=90, title="Upper Line Value?")
lowLine = input(30, minval=10, maxval=50, title="Lower Line Value?")
sml = input(true, title="Show Mid Line?")
sbh = input(true, title="Show Back Ground Highlights When RSI is Above/Below High/Low Lines?")
sch = input(true, title="Show Back Ground Highlights When RSI Cross?")
sl = input(true, title="Show 'B' and 'S' Letters When RSI Crosses High/Low Line?")
useCurrentRes = input(false, title="Use Current Chart Resolution?")
resCustom = input(title="Use Different Timeframe? Uncheck Box Above", type=resolution, defval="60")
ssRSI = input(true, title="Show 2nd RSI?")
resCustom2 = input(title="Use 2nd RSI? Check Box Above", type=resolution, defval="15")
useCurrentRes2 = input(false, title="Use 2nd RSI Plot On Samet Timeframe?")
len2 = input(14, minval=1, title="2nd RSI Length")
ssRSI2 = input(true, title="Show 3rd RSI?")
resCustom3 = input(title="Use 3rd RSI? Check Box Above", type=resolution, defval="5")
useCurrentRes3 = input(false, title="Use 3rd RSI Plot On Samet Timeframe?")
len3 = input(14, minval=1, title="3rd RSI Length")

res = useCurrentRes ? period : resCustom
res2 = useCurrentRes2 ? period : resCustom2
res3 = useCurrentRes3 ? period : resCustom3

up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
outRSI = security(tickerid, res, rsi)

up2 = rma(max(change(src), 0), len2)
down2 = rma(-min(change(src), 0), len2)
rsi2 = down2 == 0 ? 100 : up2 == 0 ? 0 : 100 - (100 / (1 + up2 / down2))
outRSI2 = security(tickerid, res2, rsi2)

up3 = rma(max(change(src), 0), len3)
down3 = rma(-min(change(src), 0), len3)
rsi3 = down3 == 0 ? 100 : up3 == 0 ? 0 : 100 - (100 / (1 + up3 / down3))
outRSI3 = security(tickerid, res3, rsi3)

aboveLine = outRSI > upLine ? 1 : 0
belowLine = outRSI < lowLine ? 1 : 0
crossUp = outRSI[1] < lowLine and outRSI > lowLine ? 1 : 0
crossDn = outRSI[1] > upLine and outRSI < upLine ? 1 : 0

bgcolor(sbh and aboveLine ? red : na, transp=70)
bgcolor(sbh and belowLine ? green : na, transp=70)
bgcolor(sch and crossUp ? lime : na, transp=40)
bgcolor(sch and crossDn ? red : na, transp=40)

plot(outRSI, title="RSI", style=line, linewidth=3, color=aqua)
plot(ssRSI and outRSI2 ? outRSI2 : na, title="2nd RSI - Different Time Frame?", style=linebr, linewidth=2, color=orange)
plot(ssRSI2 and outRSI3 ? outRSI3 : na, title="3rd RSI - Different Time Frame?", style=linebr, linewidth=2, color=yellow)
p1 = plot(upLine, title= "Upper Line", style=solid, linewidth=1, color=red)
p2 = plot(lowLine, title= "Lower Line", style=solid, linewidth=1, color=lime)
plot(sml and 50 ? 50 : na, title="Mid Line", style=linebr, linewidth=2, color=gray)
plotchar(sl and crossUp ? crossUp : na, title="Buy Signal", char='B', location=location.bottom, color=lime, transp=0, offset=0)
plotchar(sl and crossDn ? crossDn : na, title="Sell Signal", char='S', location=location.top, color=red, transp=0, offset=0)
fill(p1, p2, color=silver, transp=70)

Breakout Range LS alert 893 popup trigger ver 仮

2018/04/12 Thu

study(title="Breakout Range LS alert 893 popup trigger ver 仮", overlay = true)
look_bak = input(1, minval=1, title="Look Bak")
xHighest = highest(high, look_bak)
xLowest = lowest(low, look_bak)
ren = xHighest - xLowest
renave = sma(ren, 18)
kave = renave * 1.6
pos = iff(high > xHighest[1] and ren >= kave, 1, 0)
pos1 = iff(low < xLowest[1] and ren >= kave, 1, 0)
pos2 = iff(pos or pos1, 1, 0)
priH = xLowest + kave
priL = xHighest - kave
priA = avg(priH, priL)
plot(ren, color = aqua)
plot(renave, color = red)
plot(kave, color = yellow)
plotshape(pos, style=shape.square, location = location.belowbar, color = yellow, size = size.auto,text='893\nIncoming!\nLONG!')
plotshape(pos1, style=shape.diamond, location = location.abovebar, color = aqua, size = size.auto,text='893\nIncoming!\nSHORT!')
alertcondition(pos2, title='Breakout', message='893 incoming!')
alertcondition(pos, title='BreakoutHigh', message='893 incoming!LONG!!')
alertcondition(pos1, title='BreakoutLow', message='893 incoming!SHORT!!')
plot(priH, title='BO high price', color = aqua)
plot(priL, title='BO low price', color = red)
plot(priA, color = yellow)

Breakout Range LS alert cloud for 2h 仮

2018/04/10 Tue

study(title="Breakout Range LS alert cloud for 2h 仮", overlay = true)
look_bak = input(1, minval=1, title="Look Bak")
displacement = input(25, minval=1, title="Displacement")
xHighest = highest(high, look_bak)
xLowest = lowest(low, look_bak)
ren = xHighest - xLowest
renave = sma(ren, 5)
renave2 = sma(ren, 25)
renave3 = sma(ren, 75)
kave = renave * 1.6
kave2 = renave * 1.6
kave3 = renave * 1.6
pos = iff(high > xHighest[1] and ren >= kave, 1, 0)
pos1 = iff(low < xLowest[1] and ren >= kave, 1, 0)
priH = xLowest + kave
priL = xHighest - kave
priA = avg(priH, priL)
leadLine1 = sma(priA, 25)
leadLine2 = sma(priA, 75)
plot(ren, color = aqua)
plot(renave, color = red)
plot(kave, color = yellow)
plotshape(pos, style=shape.square, location = location.belowbar, color = yellow, size = size.auto)
plotshape(pos1, style=shape.diamond, location = location.abovebar, color = aqua, size = size.auto)
plot(priH, color = aqua)
plot(priL, color = red)
plot(priA, color = yellow)
plot(leadLine1, linewidth=2, color = aqua)
plot(leadLine2, linewidth=2, color = orange)

plot(close, offset = -displacement, color=lime)
p1 = plot(leadLine1, linewidth=4, offset = displacement, color=green,
title="Lead 1")
p2 = plot(leadLine2, linewidth=4, offset = displacement, color=red,
title="Lead 2")
fill(p1, p2, color = leadLine1 > leadLine2 ? green : red)

Breakout Range LS alert 893 cloud 仮

2018/04/10 Tue

study(title="Breakout Range LS alert 893 cloud 仮", overlay = true)
look_bak = input(1, minval=1, title="Look Bak")
displacement = input(40, minval=1, title="Displacement")
xHighest = highest(high, look_bak)
xLowest = lowest(low, look_bak)
ren = xHighest - xLowest
renave = sma(ren, 18)
renave2 = sma(ren, 40)
renave3 = sma(ren, 75)
kave = renave * 1.6
kave2 = renave * 1.6
kave3 = renave * 1.6
pos = iff(high > xHighest[1] and ren >= kave, 1, 0)
pos1 = iff(low < xLowest[1] and ren >= kave, 1, 0)
priH = xLowest + kave
priL = xHighest - kave
priA = avg(priH, priL)
leadLine1 = sma(priA, 40)
leadLine2 = sma(priA, 75)
plot(ren, color = aqua)
plot(renave, color = red)
plot(kave, color = yellow)
plotshape(pos, style=shape.square, location = location.belowbar, color = yellow, size = size.auto)
plotshape(pos1, style=shape.diamond, location = location.abovebar, color = aqua, size = size.auto)
plot(priH, color = aqua)
plot(priL, color = red)
plot(priA, color = yellow)
plot(leadLine1, linewidth=2, color = aqua)
plot(leadLine2, linewidth=2, color = orange)

plot(close, offset = -displacement, color=lime)
p1 = plot(leadLine1, linewidth=4, offset = displacement, color=green,
title="Lead 1")
p2 = plot(leadLine2, linewidth=4, offset = displacement, color=red,
title="Lead 2")
fill(p1, p2, color = leadLine1 > leadLine2 ? green : red)
プロフィール

madoqa

Author:madoqa
シガーレビューとか

最新記事
Link
カテゴリ
cigar review

最新コメント
最新トラックバック
月別アーカイブ
FC2カウンター
メールフォーム

名前:
メール:
件名:
本文:

cigar review

Tatuaje VegasdeSatiago Illusione NestorMiranda 5Vegas 

検索フォーム
RSSリンクの表示
リンク
ブロとも申請フォーム

この人とブロともになる

QRコード
QR
上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。