커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

지표식 부탁드립니다

지표식 변환 부탁합니다. 미리 감사드립니다. //@version=6 indicator('Trendlines with Breaks', overlay = true) length = input.int(14) k = input.float(1., 'Slope', minval = 0, step = .1) method = input.string('Atr', 'Slope Calculation Method', options = ['Atr', 'Stdev', 'Linreg']) show = input(false, 'Show Only Confirmed Breakouts') //---- upper = 0. lower = 0. slope_ph = 0. slope_pl = 0. src = close n = bar_index //---- ph = ta.pivothigh(length, length) pl = ta.pivotlow(length, length) slope = switch method 'Atr' => ta.atr(length) / length * k 'Stdev' => ta.stdev(src, length) / length * k 'Linreg' => math.abs(ta.sma(src * bar_index, length) - ta.sma(src, length) * ta.sma(bar_index, length)) / ta.variance(n, length) / 2 * k slope_ph := bool(ph) ? slope : slope_ph[1] slope_pl := bool(pl) ? slope : slope_pl[1] upper := bool(ph) ? ph : upper[1] - slope_ph lower := bool(pl) ? pl : lower[1] + slope_pl //---- single_upper = 0 single_lower = 0 single_upper := src[length] > upper ? 0 : bool(ph) ? 1 : single_upper[1] single_lower := src[length] < lower ? 0 : bool(pl) ? 1 : single_lower[1] //upper_breakout = single_upper[1]==1 and src[length] > upper and (show ? src > src[length] : 1) //lower_breakout = single_lower[1]==1 and src[length] < lower and (show ? src < src[length] : 1) upper_breakout = bool(single_upper[1]) and src[length] > upper and (show ? src > src[length] : true) // my modify lower_breakout = bool(single_lower[1]) and src[length] < lower and (show ? src < src[length] : true) // my modify plotshape(upper_breakout ? low[length] : na, 'Upper Break', shape.labelup, location.absolute, #ef5350, -length, text = 'B↑', textcolor = color.white, size = size.tiny) plotshape(lower_breakout ? high[length] : na, 'Lower Break', shape.labeldown, location.absolute, #26a69a, -length, text = 'B↓', textcolor = color.white, size = size.tiny) //---- var line up_l = na var line dn_l = na var label recent_up_break = na var label recent_dn_break = na if bool(ph[1]) // my modify line.delete(up_l[1]) label.delete(recent_up_break[1]) up_l := line.new(n - length - 1, ph[1], n - length, upper, color = #ef5350, extend = extend.right, style = line.style_dashed) up_l if bool(pl[1]) // my modify line.delete(dn_l[1]) label.delete(recent_dn_break[1]) dn_l := line.new(n - length - 1, pl[1], n - length, lower, color = #26a69a, extend = extend.right, style = line.style_dashed) dn_l if ta.crossover(src, upper - slope_ph * length) label.delete(recent_up_break[1]) recent_up_break := label.new(n, low, 'B', color = #ef5350, textcolor = color.white, style = label.style_label_up, size = size.small) recent_up_break if ta.crossunder(src, lower + slope_pl * length) label.delete(recent_dn_break[1]) recent_dn_break := label.new(n, high, 'B', color = #26a69a, textcolor = color.white, style = label.style_label_down, size = size.small) recent_dn_break //---- plot(upper, 'Upper', color = bool(ph) ? na : #ef5350, offset = -length) plot(lower, 'Lower', color = bool(pl) ? na : #26a69a, offset = -length) alertcondition(ta.crossover(src, upper - slope_ph * length), 'Upper Breakout', 'Price broke upper trendline') alertcondition(ta.crossunder(src, lower + slope_pl * length), 'Lower Breakout', 'Price broke lower trendline')
프로필 이미지
고도산
2025-05-28
286
글번호 191232
지표
답변완료

차트 설치 오류

차트 설치하는데 오류가납니다.. 포맷하고 다시 설치하는건데 ㅠㅠ
프로필 이미지
이신기
2025-05-27
199
글번호 191231
시스템
답변완료

yes global 틱차트 지수이평선 수치 오류

yes global 틱차트 지수 이평선 적용시 수치값이 맞지 않습니다. 분봉은 타사와 지수 이평선 값이 동일 하나 틱차트만 수치값이 전혀 다르게 나옵니다.차이가 상당합니다 이평선 모양과 위치가 다를 정도의 차이 다른 여러곳의 틱차트 이평선의 값은 동일한데 yes global만 다르게 나올 수 있는지 분봉의 지수이평선 값은 다른곳과 같은데 틱차트만 이처럼 상당한 차이가 나는 것 같은데 보정이 필요합니다. 아니면 다른 문제가 있는것인지 알려주세요
프로필 이미지
후지후지
2025-05-27
203
글번호 191230
지표
답변완료

수식 부탁드립니다

지표식 부탁드립니다. 1. //@version=5 indicator("DC", shorttitle="DC", overlay=true) length = input.int(10, title="Donchian Period", minval=1) offset = input.int(5, title="Offset") // Lvels upper = ta.highest(high, length) lower = ta.lowest(low, length) basis = (upper + lower) / 2 // Plot channels plot(basis, "Basis", color=color.orange, offset=offset) p1 = plot(upper, "Upper", color=color.blue, offset=offset) p2 = plot(lower, "Lower", color=color.blue, offset=offset) // Trend logic var int trend = 0 trend := close > upper[1] ? 1 : close < lower[1] ? -1 : trend[1] trendChangeUp = trend == 1 and trend[1] != 1 trendChangeDown = trend == -1 and trend[1] != -1 // Plot breakout arrows plotshape(trendChangeUp, title="Breakout Up", location=location.belowbar, color=color.green, style=shape.labelup, size=size.tiny, text="BUY", textcolor=color.new(color.white, 0)) plotshape(trendChangeDown, title="Breakout Down", location=location.abovebar, color=color.red, style=shape.labeldown, size=size.tiny, text="SELL", textcolor=color.new(color.white, 0)) // Fill between upper and lower with trend-based color fillColor = trend == 1 ? color.new(color.green, 85) : trend == -1 ? color.new(color.red, 85) : color.new(color.gray, 90) fill(p1, p2, color=fillColor, title="Trend Fill") 2. //@version=4 study("BOX", overlay=true, shorttitle="BOX") // 사용자 입력: 박스 길이 설정 boxp = input(5, "BOX LENGTH") // 박스 상단 및 하단 계산 LL = lowest(low, boxp) k1 = highest(high, boxp) k2 = highest(high, boxp - 1) k3 = highest(high, boxp - 2) NH = valuewhen(high > k1[1], high, 0) box1 = k3 < k2 TopBox = valuewhen(barssince(high > k1[1]) == boxp - 2 and box1, NH, 0) BottomBox = valuewhen(barssince(high > k1[1]) == boxp - 2 and box1, LL, 0) // 박스 상단 및 하단 플로팅 topPlot = plot(TopBox, linewidth=3, color=color.green, title="Top Box") bottomPlot = plot(BottomBox, linewidth=3, color=color.red, title="Bottom Box") // 박스 내부 영역 채우기 fill(topPlot, bottomPlot, color=color.new(color.blue, 90), title="Box Fill") // 봉의 위치에 따른 색상 지정 insideBox = close >= BottomBox and close <= TopBox aboveBox = close > TopBox belowBox = close < BottomBox barcolor(insideBox ? color.gray : na) barcolor(aboveBox ? color.green : na) barcolor(belowBox ? color.red : na)
프로필 이미지
사노소이
2025-05-28
259
글번호 191229
지표
답변완료

검색식 부탁드립니다. 항상 감사드립니다

A=MA(C,5,지수); EMA1 = eavg(close, 5); EMA2 = eavg(EMA1, 5); EMA3 = eavg(EMA2, 5); TEMA = 3*EMA1-3*EMA2+EMA3; Crossup(TEMA,A) 해당 신호로 검색식 부탁드립니다. 항상 감사합니다.
프로필 이미지
빅토리아75
2025-05-27
248
글번호 191217
종목검색

사공하늘 님에 의해서 삭제되었습니다.

프로필 이미지
사공하늘
2025-05-27
85
글번호 191214
검색

사공하늘 님에 의해서 삭제되었습니다.

프로필 이미지
사공하늘
2025-05-27
77
글번호 191213
검색

사공하늘 님에 의해서 삭제되었습니다.

프로필 이미지
사공하늘
2025-05-27
67
글번호 191212
검색
답변완료

종목검색식 부탁드림니다.

항상 노고에 감사드림니다. 아래의 수식을 종목검색식으로 부탁드림니다. A=wavg(2*wavg(scr,len/2) - wavg(scr,len), floor(sqrt(len))); A>A(1) && A(1)<A(2) 지표변수 scr 종가 len 49
프로필 이미지
존슨비치
2025-05-27
176
글번호 191211
종목검색
답변완료

문의 드립니다.

중심선에서도 매매가 진행되고 있습니다. 중심선 위에 주가와 20이평이 있으면서 20이평을 상향 돌파 시 매수 중심선 아래에 주가와 20이평이 있으면서 20이평을 하향 돌파 시 매도 중심선은 추세 기준이고 20이평에서만 매매되도록 부탁드립니다. var : mid(0),mav(0); mid = (DayHigh+DayLow)/2; mav = ma(c,20); if MarketPosition <= 0 and c > mid and CrossUp(c,mav) Then Buy(); if MarketPosition == 1 and CrossDown(c,mav) Then ExitLong(); if MarketPosition >= 0 and c < mid and CrossDown(c,mav) Then Sell(); if MarketPosition == -1 and CrossUp(c,mav) Then ExitShort();
프로필 이미지
선물대장
2025-05-27
151
글번호 191209
시스템