Kod:
//@version=6
// https://twitter.com/teknikcioblomov
indicator(title = 'Pivotlar', overlay = false)
ustsinir = input.float(1.4, 'gösterge üst uzaklık')
altsinir = input.float(0.6, 'gösterge alt uzaklık')
choice = input.int(title='Direnç/Destek Sayısı:', defval=2, options=[0, 1, 2, 3, 4, 5])
c = choice
var GRP1 = 'Periyotlar:'
res1 = input.timeframe(title = 'Pivot1', defval = 'D', group = GRP1)
res2 = input.timeframe(title = 'Pivot2', defval = 'W', group = GRP1)
res3 = input.timeframe(title = 'Pivot3', defval = 'M', group = GRP1)
res4 = input.timeframe(title = 'Pivot4', defval = '3M', group = GRP1)
res5 = input.timeframe(title = 'Pivot5', defval = '6M', group = GRP1)
res6 = input.timeframe(title = 'Pivot6', defval = '12M', group = GRP1)
phD = request.security(syminfo.tickerid, res1, high[1], lookahead = barmerge.lookahead_on)
plD = request.security(syminfo.tickerid, res1, low[1], lookahead = barmerge.lookahead_on)
pcD = request.security(syminfo.tickerid, res1, close[1], lookahead = barmerge.lookahead_on)
phW = request.security(syminfo.tickerid, res2, high[1], lookahead = barmerge.lookahead_on)
plW = request.security(syminfo.tickerid, res2, low[1], lookahead = barmerge.lookahead_on)
pcW = request.security(syminfo.tickerid, res2, close[1], lookahead = barmerge.lookahead_on)
phM = request.security(syminfo.tickerid, res3, high[1], lookahead = barmerge.lookahead_on)
plM = request.security(syminfo.tickerid, res3, low[1], lookahead = barmerge.lookahead_on)
pcM = request.security(syminfo.tickerid, res3, close[1], lookahead = barmerge.lookahead_on)
phM3 = request.security(syminfo.tickerid, res4, high[1], lookahead = barmerge.lookahead_on)
plM3 = request.security(syminfo.tickerid, res4, low[1], lookahead = barmerge.lookahead_on)
pcM3 = request.security(syminfo.tickerid, res4, close[1], lookahead = barmerge.lookahead_on)
phM12 = request.security(syminfo.tickerid, res5, high[1], lookahead = barmerge.lookahead_on)
plM12 = request.security(syminfo.tickerid, res5, low[1], lookahead = barmerge.lookahead_on)
pcM12 = request.security(syminfo.tickerid, res5, close[1], lookahead = barmerge.lookahead_on)
//Pivotlar
PPD = request.security(syminfo.tickerid, res1, hlc3[1], lookahead = barmerge.lookahead_on)
PPW = request.security(syminfo.tickerid, res2, hlc3[1], lookahead = barmerge.lookahead_on)
PPM = request.security(syminfo.tickerid, res3, hlc3[1], lookahead = barmerge.lookahead_on)
PPM3 = request.security(syminfo.tickerid, res4, hlc3[1], lookahead = barmerge.lookahead_on)
PPM6 = request.security(syminfo.tickerid, res5, hlc3[1], lookahead = barmerge.lookahead_on)
PPM12 = request.security(syminfo.tickerid, res6, hlc3[1], lookahead = barmerge.lookahead_on)
var CLH = 'CLH Değerleri:'
Tall = input.bool(true, 'Önceki C/L/H değerleri görünsün mü? ', group = CLH)
Call = input.bool(true, 'Önceki Kapanışlar görünsün mü? ', group = CLH)
Lall = input.bool(true, 'Önceki Düşükler görünsün mü? ', group = CLH)
Hall = input.bool(true, 'Önceki Yüksekler görünsün mü? ', group = CLH)
var GRPD = 'D Pivot Değerler:'
colorD = color.new(#ffff56, 0)
colorD1 = color.new(#ffff56, 50)
Dall = input.bool(true, 'Günlük değerlerin tümü görünsün mü? ', group = GRPD)
Dl = input.bool(true, 'Önceki Günlük Düşük görünsün mü?? ', group = GRPD)
Dc = input.bool(true, 'Önceki Günlük Kapanış görünsün mü?? ', group = GRPD)
Dh = input.bool(true, 'Önceki Günlük Yüksek görünsün mü?? ', group = GRPD)
DallR = input.bool(true, 'Günlük dirençler görünsün mü? ', group = GRPD)
DallS = input.bool(true, 'Günlük destekler görünsün mü? ', group = GRPD)
plot(Tall and Call and Dall and Dc ? pcD : na, title = 'D Close', color = colorD1 , linewidth = 1)
plot(Tall and Lall and Dall and Dl ? plD : na, title = 'D Low', color = colorD1 , linewidth = 1)
plot(Tall and Hall and Dall and Dh ? phD : na, title = 'D High', color = colorD1 , linewidth = 1)
i_PPD = input.bool(true, 'DPivot Görünsün mü? ')
plot(i_PPD and Dall and PPD > close * altsinir and PPD < close * ustsinir ? PPD : na, title = 'D Pivot', color = colorD, linewidth = 2)
Dtr1 = PPD * 2 - plD
i_Dtr1 = input.bool(true, 'DP r1 Görünsün mü? ')
plot(c>=1 and i_Dtr1 and Dall and DallR and Dtr1 > close * altsinir and Dtr1 < close * ustsinir and close> PPD ? Dtr1 : na, title = 'DP-r1', color = colorD1, linewidth = 1, style = plot.style_cross)
Dtr2 = PPD + (phD - plD)
i_Dtr2 = input.bool(true, 'DP r2 Görünsün mü? ')
plot(c>=2 and i_Dtr2 and Dall and DallR and Dtr2 > close * altsinir and Dtr2 < close * ustsinir and close> PPD ? Dtr2 : na, title = 'DP-r2', color = colorD1, linewidth = 1, style = plot.style_cross)
// Dtr3 = PPD * 2 + (phD - 2 * plD)
// i_Dtr3 = input.bool(true, 'DP r3 Görünsün mü? ')
// plot(c>=3 and i_Dtr3 and Dall and DallR and Dtr3 > close * altsinir and Dtr3 < close * ustsinir and close> PPD ? Dtr3 : na, title = 'DP-r3', color = colorD1, linewidth = 1, style = plot.style_cross)
// Dtr4 = PPD * 3 + (phD - 3 * plD)
// i_Dtr4 = input.bool(true, 'DP r4 Görünsün mü? ')
// plot(c>=4 and i_Dtr4 and Dall and DallR and Dtr4 > close * altsinir and Dtr4 < close * ustsinir and close> PPD ? Dtr4 : na, title = 'DP-r4', color = colorD1, linewidth = 1, style = plot.style_cross)
// Dtr5 = PPD * 4 + (phD - 4 * plD)
// i_Dtr5 = input.bool(true, 'DP r5 Görünsün mü? ')
// plot(c>=5 and i_Dtr5 and Dall and DallR and Dtr5 > close * altsinir and Dtr5 < close * ustsinir and close> PPD ? Dtr5 : na, title = 'DP-r5', color = colorD1, linewidth = 1, style = plot.style_cross)
Dts1 = PPD * 2 - phD
i_Dts1 = input.bool(true, 'DP s1 Görünsün mü? ')
plot(c>=1 and i_Dts1 and Dall and DallS and Dts1 > close * altsinir and Dts1 < close * ustsinir and close< PPD ? Dts1 : na, title = 'DP-s1', color = colorD1, linewidth = 1, style = plot.style_cross)
Dts2 = PPD - (phD - plD)
i_Dts2 = input.bool(true, 'DP s2 Görünsün mü? ')
plot(c>=2 and i_Dts2 and Dall and DallS and Dts2 > close * altsinir and Dts2 < close * ustsinir and close< PPD ? Dts2 : na, title = 'DP-s2', color = colorD1, linewidth = 1, style = plot.style_cross)
// Dts3 = PPD * 2 - (2 * phD - plD)
// i_Dts3 = input.bool(true, 'DP s3 Görünsün mü? ')
// plot(c>=3 and i_Dts3 and Dall and DallS and Dts3 > close * altsinir and Dts3 < close * ustsinir and close< PPD ? Dts3 : na, title = 'DP-s3', color = colorD1, linewidth = 1, style = plot.style_cross)
// Dts4 = PPD * 3 - (3 * phD - plD)
// i_Dts4 = input.bool(true, 'DP s4 Görünsün mü? ')
// plot(c>=4 and i_Dts4 and Dall and DallS and Dts4 > close * altsinir and Dts4 < close * ustsinir and close< PPD ? Dts4 : na, title = 'DP-s4', color = colorD1, linewidth = 1, style = plot.style_cross)
// Dts5 = PPD * 4 - (4 * phD - plD)
// i_Dts5 = input.bool(true, 'DP s5 Görünsün mü? ')
// plot(c>=5 and i_Dts5 and Dall and DallS and Dts5 > close * altsinir and Dts5 < close * ustsinir and close< PPD ? Dts5 : na, title = 'DP-s5', color = colorD1, linewidth = 1, style = plot.style_cross)
var GRPW = 'W Pivot Weğerler:'
colorW = color.new(#f56624, 0)
colorW1 = color.new(#f56624, 50)
Wall = input.bool(true, 'Haftalık değerlerin tümü görünsün mü? ', group = GRPW)
Wl = input.bool(true, 'Önceki Haftalık Düşük görünsün mü?? ', group = GRPW)
Wc = input.bool(true, 'Önceki Haftalık Kapanış görünsün mü?? ', group = GRPW)
Wh = input.bool(true, 'Önceki Haftalık Yüksek görünsün mü?? ', group = GRPW)
WallR = input.bool(true, 'Haftalık dirençler görünsün mü? ', group = GRPW)
WallS = input.bool(true, 'Haftalık destekler görünsün mü? ', group = GRPW)
plot(Tall and Call and Wall and Wc ? pcW : na, title = 'W Close', color = colorW1 , linewidth = 1)
plot(Tall and Lall and Wall and Wl ? plW : na, title = 'W Low', color = colorW1 , linewidth = 1)
plot(Tall and Hall and Wall and Wh ? phW : na, title = 'W High', color = colorW1 , linewidth = 1)
i_PPW = input.bool(true, 'WPivot Görünsün mü? ')
plot(i_PPW and Wall and PPW > close * altsinir and PPW < close * ustsinir ? PPW : na, title = 'W Pivot', color = colorW, linewidth = 2)
Wtr1 = PPW * 2 - plW
i_Wtr1 = input.bool(true, 'WP r1 Görünsün mü? ')
plot(c>=1 and i_Wtr1 and Wall and WallR and Wtr1 > close * altsinir and Wtr1 < close * ustsinir and close> PPW ? Wtr1 : na, title = 'WP-r1', color = colorW1, linewidth = 1, style = plot.style_cross)
Wtr2 = PPW + (phW - plW)
i_Wtr2 = input.bool(true, 'WP r2 Görünsün mü? ')
plot(c>=2 and i_Wtr2 and Wall and WallR and Wtr2 > close * altsinir and Wtr2 < close * ustsinir and close> PPW ? Wtr2 : na, title = 'WP-r2', color = colorW1, linewidth = 1, style = plot.style_cross)
// Wtr3 = PPW * 2 + (phW - 2 * plW)
// i_Wtr3 = input.bool(true, 'WP r3 Görünsün mü? ')
// plot(c>=3 and i_Wtr3 and Wall and WallR and Wtr3 > close * altsinir and Wtr3 < close * ustsinir and close> PPW ? Wtr3 : na, title = 'WP-r3', color = colorW1, linewidth = 1, style = plot.style_cross)
// Wtr4 = PPW * 3 + (phW - 3 * plW)
// i_Wtr4 = input.bool(true, 'WP r4 Görünsün mü? ')
// plot(c>=4 and i_Wtr4 and Wall and WallR and Wtr4 > close * altsinir and Wtr4 < close * ustsinir and close> PPW ? Wtr4 : na, title = 'WP-r4', color = colorW1, linewidth = 1, style = plot.style_cross)
// Wtr5 = PPW * 4 + (phW - 4 * plW)
// i_Wtr5 = input.bool(true, 'WP r5 Görünsün mü? ')
// plot(c>=5 and i_Wtr5 and Wall and WallR and Wtr5 > close * altsinir and Wtr5 < close * ustsinir and close> PPW ? Wtr5 : na, title = 'WP-r5', color = colorW1, linewidth = 1, style = plot.style_cross)
Wts1 = PPW * 2 - phW
i_Wts1 = input.bool(true, 'WP s1 Görünsün mü? ')
plot(c>=1 and i_Wts1 and Wall and WallS and Wts1 > close * altsinir and Wts1 < close * ustsinir and close< PPW ? Wts1 : na, title = 'WP-s1', color = colorW1, linewidth = 1, style = plot.style_cross)
Wts2 = PPW - (phW - plW)
i_Wts2 = input.bool(true, 'WP s2 Görünsün mü? ')
plot(c>=2 and i_Wts2 and Wall and WallS and Wts2 > close * altsinir and Wts2 < close * ustsinir and close< PPW ? Wts2 : na, title = 'WP-s2', color = colorW1, linewidth = 1, style = plot.style_cross)
// Wts3 = PPW * 2 - (2 * phW - plW)
// i_Wts3 = input.bool(true, 'WP s3 Görünsün mü? ')
// plot(c>=3 and i_Wts3 and Wall and WallS and Wts3 > close * altsinir and Wts3 < close * ustsinir and close< PPW ? Wts3 : na, title = 'WP-s3', color = colorW1, linewidth = 1, style = plot.style_cross)
// Wts4 = PPW * 3 - (3 * phW - plW)
// i_Wts4 = input.bool(true, 'WP s4 Görünsün mü? ')
// plot(c>=4 and i_Wts4 and Wall and WallS and Wts4 > close * altsinir and Wts4 < close * ustsinir and close< PPW ? Wts4 : na, title = 'WP-s4', color = colorW1, linewidth = 1, style = plot.style_cross)
// Wts5 = PPW * 4 - (4 * phW - plW)
// i_Wts5 = input.bool(true, 'WP s5 Görünsün mü? ')
// plot(c>=5 and i_Wts5 and Wall and WallS and Wts5 > close * altsinir and Wts5 < close * ustsinir and close< PPW ? Wts5 : na, title = 'WP-s5', color = colorW1, linewidth = 1, style = plot.style_cross)
var GRPM = 'M Pivot Değerler:'
colorM = color.new(#2e59ce, 0)
colorM1 = color.new(#2e59ce, 50)
Mall = input.bool(true, 'Aylık değerlerin tümü görünsün mü? ', group = GRPM)
Ml = input.bool(true, 'Önceki Aylık Düşük görünsün mü?? ', group = GRPM)
Mc = input.bool(true, 'Önceki Aylık Kapanış görünsün mü?? ', group = GRPM)
Mh = input.bool(true, 'Önceki Aylık Yüksek görünsün mü?? ', group = GRPM)
MallR = input.bool(true, 'Aylık dirençler görünsün mü? ', group = GRPM)
MallS = input.bool(true, 'Aylık destekler görünsün mü? ', group = GRPM)
plot(Tall and Call and Mall and Mc ? pcM : na, title = 'M Close', color = colorM1 , linewidth = 1)
plot(Tall and Lall and Mall and Ml ? plM : na, title = 'M Low', color = colorM1 , linewidth = 1)
plot(Tall and Hall and Mall and Mh ? phM : na, title = 'M High', color = colorM1 , linewidth = 1)
i_PPM = input.bool(true, 'MPivot Görünsün mü? ')
plot(i_PPM and Mall and PPM > close * altsinir and PPM < close * ustsinir ? PPM : na, title = 'M Pivot', color = colorM, linewidth = 2)
Mtr1 = PPM * 2 - plM
i_Mtr1 = input.bool(true, 'MP r1 Görünsün mü? ')
plot(c>=1 and i_Mtr1 and Mall and MallR and Mtr1 > close * altsinir and Mtr1 < close * ustsinir and close> PPM ? Mtr1 : na, title = 'MP-r1', color = colorM1, linewidth = 1, style = plot.style_cross)
Mtr2 = PPM + (phM - plM)
i_Mtr2 = input.bool(true, 'MP r2 Görünsün mü? ')
plot(c>=2 and i_Mtr2 and Mall and MallR and Mtr2 > close * altsinir and Mtr2 < close * ustsinir and close> PPM ? Mtr2 : na, title = 'MP-r2', color = colorM1, linewidth = 1, style = plot.style_cross)
// Mtr3 = PPM * 2 + (phM - 2 * plM)
// i_Mtr3 = input.bool(true, 'MP r3 Görünsün mü? ')
// plot(c>=3 and i_Mtr3 and Mall and MallR and Mtr3 > close * altsinir and Mtr3 < close * ustsinir and close> PPM ? Mtr3 : na, title = 'MP-r3', color = colorM1, linewidth = 1, style = plot.style_cross)
// Mtr4 = PPM * 3 + (phM - 3 * plM)
// i_Mtr4 = input.bool(true, 'MP r4 Görünsün mü? ')
// plot(c>=4 and i_Mtr4 and Mall and MallR and Mtr4 > close * altsinir and Mtr4 < close * ustsinir and close> PPM ? Mtr4 : na, title = 'MP-r4', color = colorM1, linewidth = 1, style = plot.style_cross)
// Mtr5 = PPM * 4 + (phM - 4 * plM)
// i_Mtr5 = input.bool(true, 'MP r5 Görünsün mü? ')
// plot(c>=5 and i_Mtr5 and Mall and MallR and Mtr5 > close * altsinir and Mtr5 < close * ustsinir and close> PPM ? Mtr5 : na, title = 'MP-r5', color = colorM1, linewidth = 1, style = plot.style_cross)
Mts1 = PPM * 2 - phM
i_Mts1 = input.bool(true, 'MP s1 Görünsün mü? ')
plot(c>=1 and i_Mts1 and Mall and MallS and Mts1 > close * altsinir and Mts1 < close * ustsinir and close< PPM ? Mts1 : na, title = 'MP-s1', color = colorM1, linewidth = 1, style = plot.style_cross)
Mts2 = PPM - (phM - plM)
i_Mts2 = input.bool(true, 'MP s2 Görünsün mü? ')
plot(c>=2 and i_Mts2 and Mall and MallS and Mts2 > close * altsinir and Mts2 < close * ustsinir and close< PPM ? Mts2 : na, title = 'MP-s2', color = colorM1, linewidth = 1, style = plot.style_cross)
// Mts3 = PPM * 2 - (2 * phM - plM)
// i_Mts3 = input.bool(true, 'MP s3 Görünsün mü? ')
// plot(c>=3 and i_Mts3 and Mall and MallS and Mts3 > close * altsinir and Mts3 < close * ustsinir and close< PPM ? Mts3 : na, title = 'MP-s3', color = colorM1, linewidth = 1, style = plot.style_cross)
// Mts4 = PPM * 3 - (3 * phM - plM)
// i_Mts4 = input.bool(true, 'MP s4 Görünsün mü? ')
// plot(c>=4 and i_Mts4 and Mall and MallS and Mts4 > close * altsinir and Mts4 < close * ustsinir and close< PPM ? Mts4 : na, title = 'MP-s4', color = colorM1, linewidth = 1, style = plot.style_cross)
// Mts5 = PPM * 4 - (4 * phM - plM)
// i_Mts5 = input.bool(true, 'MP s5 Görünsün mü? ')
// plot(c>=5 and i_Mts5 and Mall and MallS and Mts5 > close * altsinir and Mts5 < close * ustsinir and close< PPM ? Mts5 : na, title = 'MP-s5', color = colorM1, linewidth = 1, style = plot.style_cross)
var GRPM3 = 'M3 Pivot Değerler:'
colorM3 = color.new(#ffffff, 0)
colorM31 = color.new(#ffffff, 50)
M3all = input.bool(true, '3 Aylık değerlerin tümü görünsün mü? ', group = GRPM3)
M3l = input.bool(true, 'Önceki 3 Aylık Düşük görünsün mü?? ', group = GRPM3)
M3c = input.bool(true, 'Önceki 3 Aylık Kapanış görünsün mü?? ', group = GRPM3)
M3h = input.bool(true, 'Önceki 3 Aylık Yüksek görünsün mü?? ', group = GRPM3)
M3allR = input.bool(true, '3 Aylık dirençler görünsün mü? ', group = GRPM3)
M3allS = input.bool(true, '3 Aylık destekler görünsün mü? ', group = GRPM3)
plot(Tall and Call and M3all and M3c ? pcM3 : na, title = 'M3 Close', color = colorM31 , linewidth = 1)
plot(Tall and Lall and M3all and M3l ? plM3 : na, title = 'M3 Low', color = colorM31 , linewidth = 1)
plot(Tall and Hall and M3all and M3h ? phM3 : na, title = 'M3 High', color = colorM31 , linewidth = 1)
i_PPM3 = input.bool(true, 'M3Pivot Görünsün mü? ')
plot(i_PPM3 and M3all and PPM3 > close * altsinir and PPM3 < close * ustsinir ? PPM3 : na, title = 'M3 Pivot', color = colorM3, linewidth = 2)
M3tr1 = PPM3 * 2 - plM3
i_M3tr1 = input.bool(true, 'M3P r1 Görünsün mü? ')
plot(c>=1 and i_M3tr1 and M3all and M3allR and M3tr1 > close * altsinir and M3tr1 < close * ustsinir and close> PPM3 ? M3tr1 : na, title = 'M3P-r1', color = colorM31, linewidth = 1, style = plot.style_cross)
M3tr2 = PPM3 + (phM3 - plM3)
i_M3tr2 = input.bool(true, 'M3P r2 Görünsün mü? ')
plot(c>=2 and i_M3tr2 and M3all and M3allR and M3tr2 > close * altsinir and M3tr2 < close * ustsinir and close> PPM3 ? M3tr2 : na, title = 'M3P-r2', color = colorM31, linewidth = 1, style = plot.style_cross)
// M3tr3 = PPM3 * 2 + (phM3 - 2 * plM3)
// i_M3tr3 = input.bool(true, 'M3P r3 Görünsün mü? ')
// plot(c>=3 and i_M3tr3 and M3all and M3allR and M3tr3 > close * altsinir and M3tr3 < close * ustsinir and close> PPM3 ? M3tr3 : na, title = 'M3P-r3', color = colorM31, linewidth = 1, style = plot.style_cross)
// M3tr4 = PPM3 * 3 + (phM3 - 3 * plM3)
// i_M3tr4 = input.bool(true, 'M3P r4 Görünsün mü? ')
// plot(c>=4 and i_M3tr4 and M3all and M3allR and M3tr4 > close * altsinir and M3tr4 < close * ustsinir and close> PPM3 ? M3tr4 : na, title = 'M3P-r4', color = colorM31, linewidth = 1, style = plot.style_cross)
// M3tr5 = PPM3 * 4 + (phM3 - 4 * plM3)
// i_M3tr5 = input.bool(true, 'M3P r5 Görünsün mü? ')
// plot(c>=5 and i_M3tr5 and M3all and M3allR and M3tr5 > close * altsinir and M3tr5 < close * ustsinir and close> PPM3 ? M3tr5 : na, title = 'M3P-r5', color = colorM31, linewidth = 1, style = plot.style_cross)
M3ts1 = PPM3 * 2 - phM3
i_M3ts1 = input.bool(true, 'M3P s1 Görünsün mü? ')
plot(c>=1 and i_M3ts1 and M3all and M3allS and M3ts1 > close * altsinir and M3ts1 < close * ustsinir and close< PPM3 ? M3ts1 : na, title = 'M3P-s1', color = colorM31, linewidth = 1, style = plot.style_cross)
M3ts2 = PPM3 - (phM3 - plM3)
i_M3ts2 = input.bool(true, 'M3P s2 Görünsün mü? ')
plot(c>=2 and i_M3ts2 and M3all and M3allS and M3ts2 > close * altsinir and M3ts2 < close * ustsinir and close< PPM3 ? M3ts2 : na, title = 'M3P-s2', color = colorM31, linewidth = 1, style = plot.style_cross)
// M3ts3 = PPM3 * 2 - (2 * phM3 - plM3)
// i_M3ts3 = input.bool(true, 'M3P s3 Görünsün mü? ')
// plot(c>=3 and i_M3ts3 and M3all and M3allS and M3ts3 > close * altsinir and M3ts3 < close * ustsinir and close< PPM3 ? M3ts3 : na, title = 'M3P-s3', color = colorM31, linewidth = 1, style = plot.style_cross)
// M3ts4 = PPM3 * 3 - (3 * phM3 - plM3)
// i_M3ts4 = input.bool(true, 'M3P s4 Görünsün mü? ')
// plot(c>=4 and i_M3ts4 and M3all and M3allS and M3ts4 > close * altsinir and M3ts4 < close * ustsinir and close< PPM3 ? M3ts4 : na, title = 'M3P-s4', color = colorM31, linewidth = 1, style = plot.style_cross)
// M3ts5 = PPM3 * 4 - (4 * phM3 - plM3)
// i_M3ts5 = input.bool(true, 'M3P s5 Görünsün mü? ')
// plot(c>=5 and i_M3ts5 and M3all and M3allS and M3ts5 > close * altsinir and M3ts5 < close * ustsinir and close< PPM3 ? M3ts5 : na, title = 'M3P-s5', color = colorM31, linewidth = 1, style = plot.style_cross)
var GRPM12 = 'M12 Pivot Değerler:'
colorM12 = color.new(#d400ff, 0)
colorM121 = color.new(#d400ff, 50)
M12all = input.bool(true, '12 Aylık değerlerin tümü görünsün mü? ', group = GRPM12)
M12l = input.bool(true, 'Önceki 12 Aylık Düşük görünsün mü?? ', group = GRPM12)
M12c = input.bool(true, 'Önceki 12 Aylık Kapanış görünsün mü?? ', group = GRPM12)
M12h = input.bool(true, 'Önceki 12 Aylık Yüksek görünsün mü?? ', group = GRPM12)
M12allR = input.bool(true, '12 Aylık dirençler görünsün mü? ', group = GRPM12)
M12allS = input.bool(true, '12 Aylık destekler görünsün mü? ', group = GRPM12)
plot(Tall and Call and M12all and M12c ? pcM12 : na, title = 'M12 Close', color = colorM121 , linewidth = 1)
plot(Tall and Lall and M12all and M12l ? plM12 : na, title = 'M12 Low', color = colorM121 , linewidth = 1)
plot(Tall and Hall and M12all and M12h ? phM12 : na, title = 'M12 High', color = colorM121 , linewidth = 1)
i_PPM12 = input.bool(true, 'M12Pivot Görünsün mü? ')
plot(i_PPM12 and M12all and PPM12 > close * altsinir and PPM12 < close * ustsinir ? PPM12 : na, title = 'M12 Pivot', color = colorM12, linewidth = 2)
M12tr1 = PPM12 * 2 - plM12
i_M12tr1 = input.bool(true, 'M12P r1 Görünsün mü? ')
plot(c>=1 and i_M12tr1 and M12all and M12allR and M12tr1 > close * altsinir and M12tr1 < close * ustsinir and close> PPM12 ? M12tr1 : na, title = 'M12P-r1', color = colorM121, linewidth = 1, style = plot.style_cross)
M12tr2 = PPM12 + (phM12 - plM12)
i_M12tr2 = input.bool(true, 'M12P r2 Görünsün mü? ')
plot(c>=2 and i_M12tr2 and M12all and M12allR and M12tr2 > close * altsinir and M12tr2 < close * ustsinir and close> PPM12 ? M12tr2 : na, title = 'M12P-r2', color = colorM121, linewidth = 1, style = plot.style_cross)
// M12tr3 = PPM12 * 2 + (phM12 - 2 * plM12)
// i_M12tr3 = input.bool(true, 'M12P r3 Görünsün mü? ')
// plot(c>=3 and i_M12tr3 and M12all and M12allR and M12tr3 > close * altsinir and M12tr3 < close * ustsinir and close> PPM12 ? M12tr3 : na, title = 'M12P-r3', color = colorM121, linewidth = 1, style = plot.style_cross)
// M12tr4 = PPM12 * 3 + (phM12 - 3 * plM12)
// i_M12tr4 = input.bool(true, 'M12P r4 Görünsün mü? ')
// plot(c>=4 and i_M12tr4 and M12all and M12allR and M12tr4 > close * altsinir and M12tr4 < close * ustsinir and close> PPM12 ? M12tr4 : na, title = 'M12P-r4', color = colorM121, linewidth = 1, style = plot.style_cross)
// M12tr5 = PPM12 * 4 + (phM12 - 4 * plM12)
// i_M12tr5 = input.bool(true, 'M12P r5 Görünsün mü? ')
// plot(c>=5 and i_M12tr5 and M12all and M12allR and M12tr5 > close * altsinir and M12tr5 < close * ustsinir and close> PPM12 ? M12tr5 : na, title = 'M12P-r5', color = colorM121, linewidth = 1, style = plot.style_cross)
M12ts1 = PPM12 * 2 - phM12
i_M12ts1 = input.bool(true, 'M12P s1 Görünsün mü? ')
plot(c>=1 and i_M12ts1 and M12all and M12allS and M12ts1 > close * altsinir and M12ts1 < close * ustsinir and close< PPM12 ? M12ts1 : na, title = 'M12P-s1', color = colorM121, linewidth = 1, style = plot.style_cross)
M12ts2 = PPM12 - (phM12 - plM12)
i_M12ts2 = input.bool(true, 'M12P s2 Görünsün mü? ')
plot(c>=2 and i_M12ts2 and M12all and M12allS and M12ts2 > close * altsinir and M12ts2 < close * ustsinir and close< PPM12 ? M12ts2 : na, title = 'M12P-s2', color = colorM121, linewidth = 1, style = plot.style_cross)
colorhh= color.new(#3d7a04, 0)
plotcandle(open, high, low, close, 'fiyat', color = close > phM and close > phM3 and close > phM12 ? colorhh : close > PPM and close > PPM3 and close > PPM12 ? colorM12 : close < PPM ? colorM : close < PPM3 ? colorM3 : close < PPM12 ? colorM12 : color.red, bordercolor = close < open ? color.red : color.green)
// M12ts3 = PPM12 * 2 - (2 * phM12 - plM12)
// i_M12ts3 = input.bool(true, 'M12P s3 Görünsün mü? ')
// plot(c>=3 and i_M12ts3 and M12all and M12allS and M12ts3 > close * altsinir and M12ts3 < close * ustsinir and close< PPM12 ? M12ts3 : na, title = 'M12P-s3', color = colorM121, linewidth = 1, style = plot.style_cross)
// M12ts4 = PPM12 * 3 - (3 * phM12 - plM12)
// i_M12ts4 = input.bool(true, 'M12P s4 Görünsün mü? ')
// plot(c>=4 and i_M12ts4 and M12all and M12allS and M12ts4 > close * altsinir and M12ts4 < close * ustsinir and close< PPM12 ? M12ts4 : na, title = 'M12P-s4', color = colorM121, linewidth = 1, style = plot.style_cross)
// M12ts5 = PPM12 * 4 - (4 * phM12 - plM12)
// i_M12ts5 = input.bool(true, 'M12P s5 Görünsün mü? ')
// plot(c>=5 and i_M12ts5 and M12all and M12allS and M12ts5 > close * altsinir and M12ts5 < close * ustsinir and close< PPM12 ? M12ts5 : na, title = 'M12P-s5', color = colorM121, linewidth = 1, style = plot.style_cross)
// TMtr1 = PPM3 * 2 - plM3
// TMts1 = PPM3 * 2 - phM3
// TMtr2 = PPM3 + phM3 - plM3
// TMts2 = PPM3 - (phM3 - plM3)
// TMtr3 = PPM3 * 2 + phM3 - 2 * plM3
// TMts3 = PPM3 * 2 - (2 * phM3 - plM3)
// TMtr4 = PPM3 * 3 + phM3 - 3 * plM3
// TMts4 = PPM3 * 3 - (3 * phM3 - plM3)
// TMtr5 = PPM3 * 4 + phM3 - 4 * plM3
// TMts5 = PPM3 * 4 - (4 * phM3 - plM3)
// Ytr1 = PPM12 * 2 - plM12
// Yts1 = PPM12 * 2 - phM12
// Ytr2 = PPM12 + phM12 - plM12
// Yts2 = PPM12 - (phM12 - plM12)
// Ytr12 = PPM12 * 2 + phM12 - 2 * plM12
// Yts12 = PPM12 * 2 - (2 * phM12 - plM12)
// Ytr4 = PPM12 * 12 + phM12 - 12 * plM12
// Yts4 = PPM12 * 12 - (12 * phM12 - plM12)
// Ytr5 = PPM12 * 4 + phM12 - 4 * plM12
// Yts5 = PPM12 * 4 - (4 * phM12 - plM12)
// if ta.crossover(close, Mtr5) and close > PPM// enter long by market if current open great then previous high
// strategy.entry('Mbuy', strategy.long, 1)
// if ta.crossunder(close, Mtr5)// enter short by market if current open less then previous low
// strategy.entry('Mshort', strategy.short, 1)
Yer İmleri