Eline sağlık üstadım...
Çeşitli(seçilen)periyotlarda "Yüksekler... Pivotlar, Ichimoku Yüksekleri" ve kullanılan periyodun Ichimokusu....
Karmaşık bir sistem biliyorum, çünkü ihtiyaca göre tasarlandı, sorusu olanı cevaplarım.
Kod:
//@version=6
indicator(title = 'IM Tepe - Yüksek', overlay = true)
ustsinir= input.float(1.4,"gösterge üst uzaklık")
altsinir= input.float(0.6,"gösterge alt uzaklık")
PerB=input.timeframe(title='Büyük', defval="M")
PerO=input.timeframe(title='Orta', defval="W")
PerK=input.timeframe(title='Küçük', defval="D")
guh9M = request.security(syminfo.tickerid, PerB, ta.highest(9))
guh26M = request.security(syminfo.tickerid, PerB, ta.highest(26))
guh52M = request.security(syminfo.tickerid, PerB, ta.highest(52))
gul9M = request.security(syminfo.tickerid, PerB, ta.lowest(9))
gul26M = request.security(syminfo.tickerid, PerB, ta.lowest(26))
gul52M = request.security(syminfo.tickerid, PerB, ta.lowest(52))
gutkM = request.security(syminfo.tickerid, PerB, (guh9M + gul9M) / 2)
gukjM = request.security(syminfo.tickerid, PerB, (guh26M + gul26M) / 2)
gusaM = request.security(syminfo.tickerid, PerB, (gutkM[25] + gukjM[25]) / 2)
gusbM = request.security(syminfo.tickerid, PerB, (guh52M[25] + gul52M[25]) / 2)
M1 = gutkM>=0 ? gutkM : 0
M2 = gukjM>=0 ? gukjM : 0
M3 = gusaM>=0 ? gusaM : 0
M4 = gusbM>=0 ? gusbM : 0
tepeM = math.max(M1, M2, M3, M4)
tpM = plot(tepeM, color = #4a66e2, title = 'B', linewidth = 2)
guh9W = request.security(syminfo.tickerid, PerO, ta.highest(9))
guh26W = request.security(syminfo.tickerid, PerO, ta.highest(26))
guh52W = request.security(syminfo.tickerid, PerO, ta.highest(52))
gul9W = request.security(syminfo.tickerid, PerO, ta.lowest(9))
gul26W = request.security(syminfo.tickerid, PerO, ta.lowest(26))
gul52W = request.security(syminfo.tickerid, PerO, ta.lowest(52))
gutkW = request.security(syminfo.tickerid, PerO, (guh9W + gul9W) / 2)
gukjW = request.security(syminfo.tickerid, PerO, (guh26W + gul26W) / 2)
gusaW = request.security(syminfo.tickerid, PerO, (gutkW[25] + gukjW[25]) / 2)
gusbW = request.security(syminfo.tickerid, PerO, (guh52W[25] + gul52W[25]) / 2)
W1 = gutkW>=0 ? gutkW : 0
W2 = gukjW>=0 ? gukjW : 0
W3 = gusaW>=0 ? gusaW : 0
W4 = gusbW>=0 ? gusbW : 0
tepeW = math.max(W1, W2, W3, W4)
tpW = plot(tepeW, color = #ff0295, title = 'O', linewidth = 2)
guh9D = request.security(syminfo.tickerid, PerK, ta.highest(9))
guh26D = request.security(syminfo.tickerid, PerK, ta.highest(26))
guh52D = request.security(syminfo.tickerid, PerK, ta.highest(52))
gul9D = request.security(syminfo.tickerid, PerK, ta.lowest(9))
gul26D = request.security(syminfo.tickerid, PerK, ta.lowest(26))
gul52D = request.security(syminfo.tickerid, PerK, ta.lowest(52))
gutkD = request.security(syminfo.tickerid, PerK, (guh9D + gul9D) / 2)
gukjD = request.security(syminfo.tickerid, PerK, (guh26D + gul26D) / 2)
gusaD = request.security(syminfo.tickerid, PerK, (gutkD[25] + gukjD[25]) / 2)
gusbD = request.security(syminfo.tickerid, PerK, (guh52D[25] + gul52D[25]) / 2)
D1 = gutkD>=0 ? gutkD : 0
D2 = gukjD>=0 ? gukjD : 0
D3 = gusaD>=0 ? gusaD : 0
D4 = gusbD>=0 ? gusbD : 0
tepeD = math.max(D2,D3,D4)
tpD = plot(tepeD, color = color.rgb(9, 255, 0), title = 'K', linewidth = 2)
//res = input.timeframe(title='Time Frame', defval='D')
guh9 = ta.highest(9)
guh26 = ta.highest(26)
guh52 = ta.highest(52)
gul9 = ta.lowest(9)
gul26 = ta.lowest(26)
gul52 = ta.lowest(52)
gutk = (guh9 + gul9) / 2
gukj = (guh26 + gul26) / 2
gusa = (gutk[25] + gukj[25]) / 2
gusb = (guh52[25] + gul52[25]) / 2
hl52 = (guh52 + gul52) / 2
//gucs = request.security(syminfo.tickerid, res, math.max(math.max(gutk, gukj), math.max(gusa, gusb))[25])
colr = color.new(#ff1493, 85)
colg = color.new(#caff70, 85)
//dt = time - time[1]
//if crossover(gutk,gukj)
// label lah_2 = label.new(time, gutk, " Cross : " , color=color.white, xloc=xloc.bar_time, size=size.small , textcolor=color.black)
//if crossunder(gutk,gukj)
// label lah_2 = label.new(time, gutk, " Cross : " , color=color.red, xloc=xloc.bar_time, size=size.small , textcolor=color.black)
Gtk = plot(gutk, color=color.new(#1b8bb4, 0), title='Tenkansen', linewidth=1)
Gkj = plot(gukj, color=color.new(#8b1a1a, 0), title='Kijunsen', linewidth=1)
Gsa = plot(gusa, color=color.new(#7fffd4, 0), title='SSA', linewidth=1)
Gsb = plot(gusb, color=color.new(#fa8072, 0), title='SSB', linewidth=1)
//Gucs = plot(gucs, color=color.new(#8a2be2, 0), title='CS', linewidth=1)
h52 = plot(hl52, color=color.new(color.white, 0), title='H52', linewidth=1)
kumoc = gusa > gusb ? color.new(color.green, 90) : gusa < gusb ? color.new(color.red, 90) : na
//plotcandle(open, high, low, close, color=close < open ? color.red : color.green, bordercolor=close < open ? color.red : color.green)
//plotcandle(bo, bh, bl, bc, color=bc < bo ? colr : colg, bordercolor=bc < bo ? colr : colg, wickcolor=bc < bo ? colr : colg)
fill(Gsa, Gsb, kumoc)
cs = plot(close, color=color.new(color.yellow, 50), title='CS', linewidth=1, offset=-25)
var GRP1 = "Periyotlar:"
per = input.timeframe(title = 'Periyot 1', defval = '240', group = GRP1)
per1 = input.timeframe(title = 'Periyot 2', defval = 'D', group = GRP1)
per2 = input.timeframe(title = 'Periyot 3', defval = 'W', group = GRP1)
per3 = input.timeframe(title = 'Periyot 4', defval = 'M', group = GRP1)
per4 = input.timeframe(title = 'Periyot 5', defval = '3M', group = GRP1)
per5 = input.timeframe(title = 'Periyot 6', defval = '12M', group = GRP1)
//PIVOTLAR
pp1 = request.security(syminfo.tickerid, per1, hlc3[1], lookahead=barmerge.lookahead_on)
phigh1 = request.security(syminfo.tickerid, per1, high[1], lookahead=barmerge.lookahead_on)
plow1 = request.security(syminfo.tickerid, per1, low[1], lookahead=barmerge.lookahead_on)
pclose1 = request.security(syminfo.tickerid, per1, close[1], lookahead=barmerge.lookahead_on)
s1 = pp1 * 2 - phigh1
i_switchS1 = input.bool(true, 'Pivot 1(D) Görünsün mü? ')
plot(i_switchS1 ? phigh1 : na, title="HD-N", color=color.new(#08f800, 50), linewidth = 1, style= plot.style_cross)
pp2 = request.security(syminfo.tickerid, per2, hlc3[1], lookahead=barmerge.lookahead_on)
phigh2 = request.security(syminfo.tickerid, per2, high[1], lookahead=barmerge.lookahead_on)
plow2 = request.security(syminfo.tickerid, per2, low[1], lookahead=barmerge.lookahead_on)
pclose2 = request.security(syminfo.tickerid, per2, close[1], lookahead=barmerge.lookahead_on)
s2 = pp2 * 2 - phigh2
plot((phigh2 > close * altsinir and phigh2 < close * ustsinir) ? phigh2 : na, title="HW-N", color=color.new(#ff9900, 50), linewidth = 1, style= plot.style_cross)
//Pivot2 = plot(s2, title="S1W-N", color=color.new(#ff9900, 50), linewidth = 1, style= plot.style_cross)
pp3 = request.security(syminfo.tickerid, per3, hlc3[1], lookahead=barmerge.lookahead_on)
phigh3 = request.security(syminfo.tickerid, per3, high[1], lookahead=barmerge.lookahead_on)
plow3 = request.security(syminfo.tickerid, per3, low[1], lookahead=barmerge.lookahead_on)
pclose3 = request.security(syminfo.tickerid, per3, close[1], lookahead=barmerge.lookahead_on)
s3 = pp3 * 2 - phigh3
plot((phigh3 > close * altsinir and phigh3 < close * ustsinir) ? phigh3 : na, title="HM-N", color=color.new(#018dff, 50), linewidth = 1, style= plot.style_cross)
//Pivot3 = plot(s3, title="S1M-N", color=color.new(#018dff, 50), linewidth = 1, style= plot.style_cross)
pp4 = request.security(syminfo.tickerid, per4, hlc3[1], lookahead=barmerge.lookahead_on)
phigh4 = request.security(syminfo.tickerid, per4, high[1], lookahead=barmerge.lookahead_on)
plow4 = request.security(syminfo.tickerid, per4, low[1], lookahead=barmerge.lookahead_on)
pclose4 = request.security(syminfo.tickerid, per4, close[1], lookahead=barmerge.lookahead_on)
s4 = pp4 * 2 - phigh4
plot((phigh4 > close * altsinir and phigh4 < close * ustsinir) ? phigh4 : na, title="H3M-N", color=color.new(#ff018d, 0), linewidth = 1, style= plot.style_cross)
//Pivot4 = plot(s4, title="S13M-N", color=color.new(#ff018d, 0), linewidth = 1, style= plot.style_cross)
pp5 = request.security(syminfo.tickerid, per5, hlc3[1], lookahead=barmerge.lookahead_on)
phigh5 = request.security(syminfo.tickerid, per5, high[1], lookahead=barmerge.lookahead_on)
plow5 = request.security(syminfo.tickerid, per5, low[1], lookahead=barmerge.lookahead_on)
pclose5 = request.security(syminfo.tickerid, per5, close[1], lookahead=barmerge.lookahead_on)
s5 = pp5 * 2 - phigh5
plot((phigh5 > close * altsinir and phigh5 < close * ustsinir) ? phigh5 : na, title="HY-N", color=color.new(#00f7ff, 0), linewidth = 1, style= plot.style_cross)
//Pivot5 = plot(s5, title="SY-N", color=color.new(#00f7ff, 0), linewidth = 1, style= plot.style_cross)
Mevcut değer(seçilebilir) ile, fiyatın %40 üstünde ve altındaki değerle gösterilmez...
Yer İmleri