커뮤니티

잘 부탁드립니다

프로필 이미지
매치다2
2023-06-21 12:45:39
1239
글번호 169942
답변완료
indicator(title="Trend Indicator", shorttitle="Trend Analyzer", overlay=true, max_bars_back=(2000)) //@version=5 // Created by @erossini.tr // Inputs string ccolortp = "Color candle based on volumetric pressure compared to non-volumetric averages, confluence of fast and slow period" mode = input.string(defval = "Ichimoku", title = "Indicator", options = ["Ichimoku", "Channel and Bands", "None"]) bandinput = input.bool(defval = false, title = "Enable extentions zone") ccolorinput = input.bool(defval = true, title = "Enable candle color", tooltip = ccolortp) string ichi = "Ichimoku" string bands = "Bands and Channel" flmode = input.string(defval = "Classic mode", title = "Fast lines mode", options = ["Volume averages", "Classic mode"], group = ichi) ssamode = input.string(defval = "Auto", title = "SSA line mode", options = ["Volume average", "Classic mode", "Mixed", "Auto"], group = ichi) ssbmode = input.string(defval = "VWMA", title = "SSB line mode", options = ["VWMA", "Classic"], group = ichi) // Ichimoku conversionPeriods = input(11, title = "Fast Line", group = ichi) basePeriods = input(26, title = "Slow Line", group = ichi) lnt = input(89, title = "SSB Line", group = ichi) conv2 = ta.vwma(close, conversionPeriods) base2 = ta.vwma(close, basePeriods) conversionLine = math.avg(ta.lowest(conversionPeriods), ta.highest(conversionPeriods)) baseLine = math.avg(ta.lowest(basePeriods), ta.highest(basePeriods)) leadLine1 = math.avg(conversionLine, baseLine) leadLine12 = math.avg(conv2, base2) leadLine13 = math.avg(conv2, base2, conversionLine, baseLine) leadLine2 = ta.vwma(close, lnt) leadline21 = math.avg(ta.lowest(lnt), ta.highest(lnt)) // Trama ama = 0.00 lengthTR = input(34, title = "Trama Backline Lenght", group = ichi) hh = math.max(math.sign(ta.change(ta.highest(lengthTR))),0) ll = math.max(math.sign(ta.change(ta.lowest(lengthTR))*-1),0) tc = math.pow(ta.sma(hh or ll ? 1 : 0,lengthTR),2) ama := nz(ama[1]+tc*(close-ama[1]),close) // Bands and channel source = hlc3 mode3 = input.string(defval = "Channel", title = "Mode", options = ["Channel", "Bands"], group = bands) period = input(title = "Period", defval = 34, group = bands) multi = input(title = "Multiplier", defval = 3.14, group = bands) smooth = input(defval = 1, title = "Smoothing value", group = bands) sma = ta.vwma(source, period) // Keltner Channel f_kc(src, length, mult, useTrueRange) => float basis = sma float span = (useTrueRange) ? ta.tr : (high - low) float rangeEma = ta.ema(span, length) [basis, basis + rangeEma * mult, basis - rangeEma * mult] [kcmiddle, kcupper, kclower] = f_kc(source, period, multi, true) // Bollinger Bands f_bb(src, length, mult) => float basis2 = sma float dev = multi * ta.stdev(source, period) [basis2, basis2 + dev, basis2 - dev] [bbmiddle, bbupper, bblower] = f_bb(close, 5, 4) // Plot plotmiddle = if mode3 == "Channel" (ta.sma(kcmiddle, smooth)) else if mode3 == "Bands" (ta.sma(bbmiddle, smooth)) plotupper = if mode3 == "Channel" (ta.sma(kcupper, smooth)) else if mode3 == "Bands" (ta.sma(bbupper, smooth)) plotlower = if mode3 == "Channel" (ta.sma(kclower, smooth)) else if mode3 == "Bands" (ta.sma(bblower, smooth)) // Candle color Lenghtfast = 11 Lenghtslow = 89 colorup = #2962ff colordown = #e91e63 a1 = ta.sma(hlc3, Lenghtfast*2) a2 = ta.vwma(hlc3, Lenghtfast) a3 = ta.sma(hlc3, Lenghtslow*2) a4 = ta.vwma(hlc3, Lenghtslow) c3 = if a1 > a2 and a3 > a4 and ccolorinput == true (colordown) else if a1 < a2 and a3 < a4 and ccolorinput == true (colorup) barcolor(c3) // Extension zones [middle2, upper2, lower2] = ta.kc(close, 200, 12, false) [middle3, upper3, lower3] = ta.kc(close, 200, 23, false) g1 = if bandinput == true upper2 g2 = if bandinput == true upper3 g3 = if bandinput == true lower2 g4 = if bandinput == true lower3 h1 = plot(g1, color = color.new(color.gray, 100), editable = false) h2 = plot(g2, color = color.new(color.gray, 100), editable = false) h3 = plot(g3, color = color.new(color.gray, 100), editable = false) h4 = plot(g4, color = color.new(color.gray, 100), editable = false) fill(h3, h4, color = color.new(#2962ff, 85), title = "Lower zone") fill(h1, h2, color = color.new(#e91e63, 85), title = "Upper zone") // Plot displacement = input(26, title = "Forward displacement", group = ichi) backdisp = input(30, title = "Backwards displacement", group = ichi) p9 = if ssbmode == "VWMA" p9 = leadLine2 else if ssbmode == "Classic" p9 = leadline21 x1 = if flmode == "Volume averages" x1 = conv2 else if flmode == "Classic mode" x1 = conversionLine x2 = if flmode == "Volume averages" x2 = base2 else if flmode == "Classic mode" x2 = baseLine u1 = if ssamode == "Volume average" u1 = leadLine12 else if ssamode == "Classic mode" u1 = leadLine1 else if ssamode == "Mixed" u1 = leadLine13 else if ssamode == "Auto" u1 = math.avg(x1, x2) kjuncol = conversionLine > baseLine ? #2962ff : conversionLine < baseLine ? #e91e63 : color.gray q1 = if mode == "Ichimoku" x1 q2 = if mode == "Ichimoku" x2 q3 = if mode == "Ichimoku" u1 q4 = if mode == "Ichimoku" p9 q5 = if mode == "Ichimoku" ama q6 = if mode == "Channel and Bands" plotmiddle q7 = if mode == "Channel and Bands" plotupper q8 = if mode == "Channel and Bands" plotlower plot(q1, color=color.gray, title="Conversion Line") plot(q2, color=kjuncol, linewidth=2, title="Base Line") p8 = plot(q3, offset = displacement, color=#2962ffb4, title="SSA") p3 = plot(q4, offset = displacement, color=#e91e62b2, title="SSB") fill(p8, p3,color.rgb(134, 134, 134, 77), title = "Kumo Cloud") plot(q5, color = color.rgb(149, 0, 179, 10), offset = -backdisp, title = "Backline", style = plot.style_circles) plot(q6, color = color.gray, title = "Middle line") p10 = plot(q8, color = #2962ff, title = "Lower line") p20 = plot(q7, color = #e91e63, title = "Upper line") fill(p10, p20, color = color.new(color.gray, 90), title = "Channel Background")
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-06-21 17:46:22

안녕하세요 예스스탁입니다. 올려주신 내용은 변환해 드리기 어렵습니다. 내용상 변환해 보는데 시간이 많이 소모됩니다. 도움을 드리지 못해 죄송합니다. 즐거운 하루되세요 > 매치다2 님이 쓴 글입니다. > 제목 : 잘 부탁드립니다 > indicator(title="Trend Indicator", shorttitle="Trend Analyzer", overlay=true, max_bars_back=(2000)) //@version=5 // Created by @erossini.tr // Inputs string ccolortp = "Color candle based on volumetric pressure compared to non-volumetric averages, confluence of fast and slow period" mode = input.string(defval = "Ichimoku", title = "Indicator", options = ["Ichimoku", "Channel and Bands", "None"]) bandinput = input.bool(defval = false, title = "Enable extentions zone") ccolorinput = input.bool(defval = true, title = "Enable candle color", tooltip = ccolortp) string ichi = "Ichimoku" string bands = "Bands and Channel" flmode = input.string(defval = "Classic mode", title = "Fast lines mode", options = ["Volume averages", "Classic mode"], group = ichi) ssamode = input.string(defval = "Auto", title = "SSA line mode", options = ["Volume average", "Classic mode", "Mixed", "Auto"], group = ichi) ssbmode = input.string(defval = "VWMA", title = "SSB line mode", options = ["VWMA", "Classic"], group = ichi) // Ichimoku conversionPeriods = input(11, title = "Fast Line", group = ichi) basePeriods = input(26, title = "Slow Line", group = ichi) lnt = input(89, title = "SSB Line", group = ichi) conv2 = ta.vwma(close, conversionPeriods) base2 = ta.vwma(close, basePeriods) conversionLine = math.avg(ta.lowest(conversionPeriods), ta.highest(conversionPeriods)) baseLine = math.avg(ta.lowest(basePeriods), ta.highest(basePeriods)) leadLine1 = math.avg(conversionLine, baseLine) leadLine12 = math.avg(conv2, base2) leadLine13 = math.avg(conv2, base2, conversionLine, baseLine) leadLine2 = ta.vwma(close, lnt) leadline21 = math.avg(ta.lowest(lnt), ta.highest(lnt)) // Trama ama = 0.00 lengthTR = input(34, title = "Trama Backline Lenght", group = ichi) hh = math.max(math.sign(ta.change(ta.highest(lengthTR))),0) ll = math.max(math.sign(ta.change(ta.lowest(lengthTR))*-1),0) tc = math.pow(ta.sma(hh or ll ? 1 : 0,lengthTR),2) ama := nz(ama[1]+tc*(close-ama[1]),close) // Bands and channel source = hlc3 mode3 = input.string(defval = "Channel", title = "Mode", options = ["Channel", "Bands"], group = bands) period = input(title = "Period", defval = 34, group = bands) multi = input(title = "Multiplier", defval = 3.14, group = bands) smooth = input(defval = 1, title = "Smoothing value", group = bands) sma = ta.vwma(source, period) // Keltner Channel f_kc(src, length, mult, useTrueRange) => float basis = sma float span = (useTrueRange) ? ta.tr : (high - low) float rangeEma = ta.ema(span, length) [basis, basis + rangeEma * mult, basis - rangeEma * mult] [kcmiddle, kcupper, kclower] = f_kc(source, period, multi, true) // Bollinger Bands f_bb(src, length, mult) => float basis2 = sma float dev = multi * ta.stdev(source, period) [basis2, basis2 + dev, basis2 - dev] [bbmiddle, bbupper, bblower] = f_bb(close, 5, 4) // Plot plotmiddle = if mode3 == "Channel" (ta.sma(kcmiddle, smooth)) else if mode3 == "Bands" (ta.sma(bbmiddle, smooth)) plotupper = if mode3 == "Channel" (ta.sma(kcupper, smooth)) else if mode3 == "Bands" (ta.sma(bbupper, smooth)) plotlower = if mode3 == "Channel" (ta.sma(kclower, smooth)) else if mode3 == "Bands" (ta.sma(bblower, smooth)) // Candle color Lenghtfast = 11 Lenghtslow = 89 colorup = #2962ff colordown = #e91e63 a1 = ta.sma(hlc3, Lenghtfast*2) a2 = ta.vwma(hlc3, Lenghtfast) a3 = ta.sma(hlc3, Lenghtslow*2) a4 = ta.vwma(hlc3, Lenghtslow) c3 = if a1 > a2 and a3 > a4 and ccolorinput == true (colordown) else if a1 < a2 and a3 < a4 and ccolorinput == true (colorup) barcolor(c3) // Extension zones [middle2, upper2, lower2] = ta.kc(close, 200, 12, false) [middle3, upper3, lower3] = ta.kc(close, 200, 23, false) g1 = if bandinput == true upper2 g2 = if bandinput == true upper3 g3 = if bandinput == true lower2 g4 = if bandinput == true lower3 h1 = plot(g1, color = color.new(color.gray, 100), editable = false) h2 = plot(g2, color = color.new(color.gray, 100), editable = false) h3 = plot(g3, color = color.new(color.gray, 100), editable = false) h4 = plot(g4, color = color.new(color.gray, 100), editable = false) fill(h3, h4, color = color.new(#2962ff, 85), title = "Lower zone") fill(h1, h2, color = color.new(#e91e63, 85), title = "Upper zone") // Plot displacement = input(26, title = "Forward displacement", group = ichi) backdisp = input(30, title = "Backwards displacement", group = ichi) p9 = if ssbmode == "VWMA" p9 = leadLine2 else if ssbmode == "Classic" p9 = leadline21 x1 = if flmode == "Volume averages" x1 = conv2 else if flmode == "Classic mode" x1 = conversionLine x2 = if flmode == "Volume averages" x2 = base2 else if flmode == "Classic mode" x2 = baseLine u1 = if ssamode == "Volume average" u1 = leadLine12 else if ssamode == "Classic mode" u1 = leadLine1 else if ssamode == "Mixed" u1 = leadLine13 else if ssamode == "Auto" u1 = math.avg(x1, x2) kjuncol = conversionLine > baseLine ? #2962ff : conversionLine < baseLine ? #e91e63 : color.gray q1 = if mode == "Ichimoku" x1 q2 = if mode == "Ichimoku" x2 q3 = if mode == "Ichimoku" u1 q4 = if mode == "Ichimoku" p9 q5 = if mode == "Ichimoku" ama q6 = if mode == "Channel and Bands" plotmiddle q7 = if mode == "Channel and Bands" plotupper q8 = if mode == "Channel and Bands" plotlower plot(q1, color=color.gray, title="Conversion Line") plot(q2, color=kjuncol, linewidth=2, title="Base Line") p8 = plot(q3, offset = displacement, color=#2962ffb4, title="SSA") p3 = plot(q4, offset = displacement, color=#e91e62b2, title="SSB") fill(p8, p3,color.rgb(134, 134, 134, 77), title = "Kumo Cloud") plot(q5, color = color.rgb(149, 0, 179, 10), offset = -backdisp, title = "Backline", style = plot.style_circles) plot(q6, color = color.gray, title = "Middle line") p10 = plot(q8, color = #2962ff, title = "Lower line") p20 = plot(q7, color = #e91e63, title = "Upper line") fill(p10, p20, color = color.new(color.gray, 90), title = "Channel Background")