커뮤니티

예스랭귀지 Q&A

글쓰기

yamu 님에 의해서 삭제되었습니다.

프로필 이미지
yamu
2025-06-05
1
글번호 191464
지표
답변완료

조건검색식 문의드립니다.

input : 기간(200),a(70),b(11); var : hull(0); hull = WMa(WMa(c,기간/2)*2 - WMa(c, 기간), floor(sqrt(기간))); if CrossUp(C,EnvelopeDown(a,b)) Then var1 = O; if sDate != sDate[1] Then var2 = 0; if CrossDown(hull,var1) Then var2 = var2+1; if var2 >= 1 and c > var1 and C <= var1*1.15 Then Find(1); 위 수식은 일전에 만들어준 수식인데, 위 수식에서 b=ValueWhen(1,(crossup(c,envelopedown(a,b))),L); 위 지표라인으로 해당 부분을 변경(대체) 해주시면 감사드리겠습니다(___)
프로필 이미지
살빼고싶다
2025-06-05
260
글번호 191456
검색
답변완료

부탁드립니다

수고하십니다 아래수식을 예스로 부탁드립니다 // INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ int length = input(50) float factor = input.float(1.0, "Factor", step = 0.1) // Color color col_up = input(color.lime, "", inline = "col") color col_dn = input(color.rgb(221, 26, 26), "", inline = "col") color col_ul = input(color.aqua, "", inline = "col") // } // CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ trend(length)=> var direction = 0 var count_up = 0. var count_dn = 0. float volatility = ta.sma(high-low, 70) * factor float upper = ta.highest(ta.sma(close, 25) + volatility, int(length/2)) float lower = ta.lowest(ta.sma(close, length) - volatility, int(length/2)) bool sig_up = ta.crossover(hlc3, upper) and barstate.isconfirmed bool sig_dn = ta.crossunder(hlc3, lower) and barstate.isconfirmed switch sig_up => direction := 1 sig_dn => direction := -1 upper := direction == 1 ? float(na) : upper lower := direction == -1 ? float(na) : lower // Trends Duration if direction == 1 count_up += 0.5 count_dn := 0 if direction == -1 count_dn += 0.5 count_up := 0 count_up := count_up > 70 ? 70 : count_up count_dn := count_dn > 70 ? 70 : count_dn [upper, lower, direction, count_up, count_dn] [upper, lower, direction, count_up, count_dn] = trend(length) float upper_band = lower + ta.atr(100)*5 float lower_band = upper - ta.atr(100)*5 color upper_col = color.new(col_dn, int(count_dn)) color lower_col = color.new(col_up, int(count_up)) color upper_band_col = color.new(col_ul, 70 - int(count_up)) color lower_band_col = color.new(col_ul, 70 - int(count_dn)) // } // PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ plot(upper_band, "Upper Wave", style = plot.style_linebr, color = bar_index % 2 == 0 ? na : upper_band_col, linewidth = 1) plot(lower_band, "Lower Wave", style = plot.style_linebr, color = bar_index % 2 == 0 ? na : lower_band_col, linewidth = 1) plot(upper, "Upper Band", style = plot.style_linebr, color = upper_col, linewidth = 2) plot(lower, "Lower Band", style = plot.style_linebr, color = lower_col, linewidth = 2) plot(upper, "Upper Band Shadow", style = plot.style_linebr, color = color.new(col_dn, int(count_dn*2)), linewidth = 6) plot(lower, "Lower Band Shadow", style = plot.style_linebr, color = color.new(col_up, int(count_up*2)), linewidth = 6) plotshape(direction != direction[1] and direction == 1 ? lower : na, "Trend Up", shape.circle, location.absolute, size = size.tiny, color = col_up) plotshape(direction != direction[1] and direction == 1 ? lower : na, "Trend Up", shape.circle, location.absolute, size = size.small, color = color.new(col_up, 70)) plotshape(direction != direction[1] and direction == -1 ? upper : na, "Trend Down", shape.circle, location.absolute, size = size.tiny, color = col_dn) plotshape(direction != direction[1] and direction == -1 ? upper : na, "Trend Down", shape.circle, location.absolute, size = size.small, color = color.new(col_dn, 70)) // Trend Duration (70 max) // if barstate.islast // if direction == 1 // label.delete(label.new(bar_index, lower, str.tostring(count_up), color = color(na), style = label.style_label_left, textcolor = chart.fg_color)[1]) // if direction == -1 // label.delete(label.new(bar_index, upper, str.tostring(count_dn), color = color(na), style = label.style_label_left, textcolor = chart.fg_color)[1]) // }
프로필 이미지
파생돌이
2025-06-05
294
글번호 191449
지표
답변완료

조건검색식 문의드립니다.

첫번째 수식 문의 이동 = ma(C, 20); 이동1 = ma(C, 200); 조건 = CrossUp(이동, 이동1); 라인 = Valuewhen(1, 조건, (H + L) / 1.95); 신호 = 라인 != Ref(라인, 1); 2번째 수식 문의 신=H-L; 호=MAX(C,O)-L; 조건=신/호>2 && H/C(1)>1.05; 기준선=valuewhen(1,조건,H); 신호=crossup(C, 기준선); 당일 장중에 30분봉 상에서, 위 신호가 뜬 종목에 대해서 다 검출할 수 있도록 해주시면 감사드리겠습니다. 종가 기준으로 신호가 뜬 자리가 아닌, 당일 장중에라도 위 신호가 발생 된 종목을 검출하고 싶습니다. 검색식은 첫번째 문의 1개 두번째 문의 1개 각각 부탁드리겠습니다! 감사드립니다(__)
프로필 이미지
살빼고싶다
2025-06-05
232
글번호 191442
검색
답변완료

문의드립니다

야간선물용으로 지표를 만들때 (야간시간: 18시 ~ 다음날 6시) StartTime(180000),EndTime(055000); 이렇게 표시하면 될까요? 아니면 endtime을 빼고 startime만 넣어도 자정넘어 다음날까지 지표출력이 될까요?
프로필 이미지
러블리
2025-06-05
225
글번호 191441
지표
답변완료

수식 문의드립니다.

안녕하세요. 기존 사용하는 수식에 덧붙여서 사용할 수 있는 수식 부탁드립니다. 매수진입/매도진입 이후에 3분이 지나도록 손실구간에 있을 경우에는 자동 청산되도록 하는 수식을 부탁드리겠습니다. 항상 감사드립니다.
프로필 이미지
트레이더365
2025-06-05
205
글번호 191439
시스템

우유 님에 의해서 삭제되었습니다.

프로필 이미지
우유
2025-06-05
50
글번호 191438
시스템
답변완료

수식수정요청

늘 도움 감사합니다 아래의 수식을 기반으로 3연속 이상 의 봉을 기반으로 박스를 그리고 싶은데 오류가 나오네요 살펴서 수정 부탁드립니다. Inputs: N(3), // 연속 봉 개수 기준 BullishColor(Red), // 양봉 선 색상 BearishColor(Blue), // 음봉 선 색상 LineWidth(1); // 선 굵기 Vars: bullishCount(0), bearishCount(0), drewBullBox(False), drewBearBox(False), startBar(0), firstDate(0), firstTime(0), lastDate(0), lastTime(0), lineTop(0), lineBottom(0), lineTopID(0), lineBottomID(0); // 연속 양봉 카운트 및 첫 봉 기록 If Close > Open Then Begin bullishCount = bullishCount + 1; bearishCount = 0; If bullishCount = 1 Then Begin startBar = CurrentBar; firstDate = Date; firstTime = Time; End; lastDate = Date; lastTime = Time; End // 연속 음봉 카운트 및 첫 봉 기록 Else If Close < Open Then Begin bearishCount = bearishCount + 1; bullishCount = 0; If bearishCount = 1 Then Begin startBar = CurrentBar; firstDate = Date; firstTime = Time; End; lastDate = Date; lastTime = Time; End Else Begin bullishCount = 0; bearishCount = 0; End; // 연속 3봉 이상 양봉 구간일 때 선 그리기 If bullishCount >= N Then Begin lineTop = High; // 마지막 봉 고가 lineBottom = Low[startBar]; // 첫 봉 저가 // 이전에 그렸던 선 있으면 삭제 If drewBullBox Then Begin TL_Delete(lineTopID); TL_Delete(lineBottomID); End; // 상단 선: 첫봉 시간 ~ 현재 시간, 가격 = 마지막 봉 고가 lineTopID = TL_New(firstDate, firstTime, lineTop, lastDate, lastTime, lineTop); TL_SetColor(lineTopID, BullishColor); TL_SetSize(lineTopID, LineWidth); TL_SetStyle(lineTopID, Tool_Solid); // 하단 선: 첫봉 시간 ~ 현재 시간, 가격 = 첫 봉 저가 lineBottomID = TL_New(firstDate, firstTime, lineBottom, lastDate, lastTime, lineBottom); TL_SetColor(lineBottomID, BullishColor); TL_SetSize(lineBottomID, LineWidth); TL_SetStyle(lineBottomID, Tool_Solid); drewBullBox = True; drewBearBox = False; End Else If bullishCount = 0 And drewBullBox Then Begin // 연속 양봉 끊어졌을 때 선 삭제 TL_Delete(lineTopID); TL_Delete(lineBottomID); drewBullBox = False; End; // 연속 3봉 이상 음봉 구간일 때 선 그리기 If bearishCount >= N Then Begin lineTop = High[startBar]; // 첫 봉 고가 lineBottom = Low; // 마지막 봉 저가 If drewBearBox Then Begin TL_Delete(lineTopID); TL_Delete(lineBottomID); End; // 상단 선: 첫 봉 고가 lineTopID = TL_New(firstDate, firstTime, lineTop, lastDate, lastTime, lineTop); TL_SetColor(lineTopID, BearishColor); TL_SetSize(lineTopID, LineWidth); TL_SetStyle(lineTopID, Tool_Solid); // 하단 선: 마지막 봉 저가 lineBottomID = TL_New(firstDate, firstTime, lineBottom, lastDate, lastTime, lineBottom); TL_SetColor(lineBottomID, BearishColor); TL_SetSize(lineBottomID, LineWidth); TL_SetStyle(lineBottomID, Tool_Solid); drewBearBox = True; drewBullBox = False; End Else If bearishCount = 0 And drewBearBox Then Begin // 연속 음봉 끊어졌을 때 선 삭제 TL_Delete(lineTopID); TL_Delete(lineBottomID); drewBearBox = False; End;
프로필 이미지
알리섬
2025-06-05
277
글번호 191434
지표

우유 님에 의해서 삭제되었습니다.

프로필 이미지
우유
2025-06-05
3
글번호 191433
시스템
답변완료

검색식 요청 드립니다!

안녕하세요! 항상 노고가 많으십니다! 아래의 수식(?)을 적용하면 buy sell 신호가 뜨는데요 buy 신호가 뜨는 종목을 검색하고픈데 실력이 미천하여 헤매고 있습니다 ㅠㅠ 이번에도 도움을 요청 드려 봅니다! //ALMA Smoothing input : src(close); input : smooth(1); input : length1(25); var : offset(0.85),sigma1(7),pchange(0),avpchange(0); offset = 0.85; sigma1 = 7; pchange = (src-src[smooth]) / src * 100; var : i(0),mm(0),s(0),norm(0),sum(0),weight(0); var : r(0),rsiL(False),rsiS(False); var : length11(0),src1(0),momm(0); var : m1(0),m2(0),sm1(0),sm2(0),chandeMO(0),cL(False),cS(False); mm = offset * (length1 - 1); s = length1 / sigma1; norm = 0.0; sum = 0.0; for i = 0 to length1 - 1 { weight = exp(-1 * pow(i - mm, 2) / (2 * pow(s, 2))); norm = norm + weight; sum = sum + pchange[length1 - i - 1] * weight; } avpchange = sum / norm; //RSI r = rsi(14); rsiL = r > r[1]; rsiS = r < r[1]; //Chande Momentum length11 = 9; src1 = close; momm = src1-src1[1]; m1 = iff(momm >= 0.0 , momm , 0.0); m2 = iff(momm >= 0.0 , 0 , -momm); sm1 = AccumN(m1, length11); sm2 = AccumN(m2, length11); chandeMO = 100 * (sm1-sm2) / (sm1+sm2); cL = chandeMO > chandeMO[1]; cS = chandeMO < chandeMO[1]; //GAMA credit to author: &#169; LeafAlgo https://www.tradingview.com/v/th7NZUPM/ input : length(14); input : adaptive(true); input : volatilityPeriod(20); input : vv(1); var : gma(0),sumOfWeights(0),sigma(0),value(0),gmaColor(0),tx(0); // Calculate Gaussian Moving Average gma = 0.0; sumOfWeights = 0.0; sigma = iff(adaptive , std(close, volatilityPeriod) ,vv); for i = 0 to length - 1 { weight = exp(-pow(((i - (length - 1)) / (2 * sigma)), 2) / 2); value = highest(avpchange, i + 1) + lowest(avpchange, i + 1); gma = gma + (value * weight); sumOfWeights = sumOfWeights + weight; } gma = (gma / sumOfWeights)/2; gma = ema(gma, 7); gmaColor = iff(avpchange >= gma , rgb(0, 161, 5) , rgb(215, 0, 0)); var : currentSignal(0),barColor(Nan); currentSignal = iff(avpchange >= gma , 1 , -1); if currentSignal == 1 Then barColor = rgb(0, 186, 6); else if currentSignal == -1 Then barColor = rgb(176, 0, 0); if CrossUp(avpchange,gma) Then { tx = text_new(sDate[1],sTime[1],L[1],"B"); Text_SetStyle(tx,2,0); Text_SetColor(tx,rgb(0, 161, 5)); } if CrossDown(avpchange,gma) Then { tx = text_new(sDate[1],sTime[1],H[1],"S"); Text_SetStyle(tx,2,1); Text_SetColor(tx,rgb(215, 0, 0)); }
프로필 이미지
수지성
2025-06-05
277
글번호 191430
종목검색