커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

피봇 돌파

분봉 피봇 2차 돌파를 하는 종목중에서 거래대금 3분봉에서 30억 이상 터진 종목 검색식 부탁드립니다.
프로필 이미지
절대원칙30
2025-05-26
308
글번호 191149
종목검색
답변완료

수식변환 부탁드립니다.

안녕하세요 수식변환 부탁드립니다. 1 수식1 A=highest(c,period); valuewhen(1,A>A(1),A) 수식2 B=lowest(c,period); valuewhen(1,B<B(1),B) period 13 2 수식1. TT=Ttsf(C,기간); ValueWhen(1,TT >TT(1),TT) 수식2 TT=Ttsf(C,기간); ValueWhen(1,TT < TT(1),TT) 수식3 Ttsf(C,기간) 기간 14
프로필 이미지
이글루
2025-05-25
300
글번호 191148
지표
답변완료

진입봉의 저가/고가

안녕하세요 해당 코드로 진입 시 손절라인을 진입봉의 저가/고가 or 특정 봉 수 지난 후로 설정하고 있습니다 var : hh(0),ll(0); input:X1(5); // 1~10, 직전 XX봉 횟수 ll = lowest(L,X1); hh = highest(H,X1); Condition1 = CrossUp(C,hh[1]) and MarketPosition == 0; Condition2 = CrossDown(C,ll[1]) and MarketPosition == 0; If Condition1 == True then Buy("B1",AtMarket,DEf,1); If Condition2 == True then Sell("B2",AtMarket,DEf,1); // 손절: 진입신호 봉의 저가 손절 input:FF(8); // 1~10, 진입 후 XX봉 경과 If MarketPosition == 1 and (EntryPrice < L[BarsSinceEntry[0]] or BarsSinceEntry > FF) Then ExitLong("C1"); If MarketPosition == -1 and (EntryPrice > H[BarsSinceEntry[0]] or BarsSinceEntry > FF) Then ExitShort("C2"); // 청산: 1% 단위로 일정 되돌림 비율 If OpenPositionProfit / EntryPrice >= 0.01 and OpenPositionProfit / EntryPrice < 0.02 Then SetStopTrailing(1,2,PercentStop); If OpenPositionProfit / EntryPrice >= 0.02 and OpenPositionProfit / EntryPrice < 0.03 Then SetStopTrailing(1.8,3,PercentStop); If OpenPositionProfit / EntryPrice >= 0.03 and OpenPositionProfit / EntryPrice < 0.04 Then SetStopTrailing(2.8,4,PercentStop); If OpenPositionProfit / EntryPrice >= 0.04 and OpenPositionProfit / EntryPrice < 0.05 Then SetStopTrailing(4,5,PercentStop); 하지만 NG.1로 백테스트했을때 진입봉 저가/고가 조건이 전혀 발동이 안되네요 확인 부탁드리겠습니다 감사합니다
프로필 이미지
sewzie
2025-05-25
218
글번호 191147
시스템
답변완료

SymbolCode 지원 문의

안녕하세요. 종목검색에서는 SymbolCode는 지원하지 않는 건가요? if(SymbolCode == "XXXXXX") Then { find(1); } 이런 수식이 동작을 안하네요.
프로필 이미지
edan
2025-05-25
221
글번호 191146
종목검색

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

프로필 이미지
사공하늘
2025-05-25
95
글번호 191145
검색
답변완료

수식확인요청

안녕하세요 아래와 같이 주봉시가 함수를 만들려고 하는데 Input: N(Numeric); Var: j(0); Var: 요일(0); Array: weekO[100](0); Begin 요일 = DayOfWeek(Date); If Date[1] < Date and 요일[1] >= 요일 Then Begin For j = 99 Downto 1 Begin weekO[j] = weekO[j-1]; End; weekO[0] = O; End; WeekOpen = weekO[N]; End; 상기와 같이 수정하니 선언되지 않은 이름 weekopen이 사용되었다고 하고 값을 대입할 수 있는 입력변수, 입력변수배열의 요소가 와야 한다고 합니다. 혹시 수정가능하신지요 미리 감사드립니다.
프로필 이미지
풍요
2025-05-25
266
글번호 191144
사용자 함수
답변완료

부틱드립니다

수고하십니다 아래수식을 예스로 부탁드립니다 // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // &#169; Adarsh //@version=4 // Moving Average 3.0 (3rd Generation) s cript may be freely distributed under the MIT license. Copyright (c) 2018-present, Alex Orekhov (everget) study("IDEAL BB with MA (With Alerts) by Adarsh", overlay=true) length1 = input(title="1st Length", type=input.integer, minval=1, defval=120) length2 = input(title="2nd Length", type=input.integer, minval=1, defval=12) maInput = input(title="MA Type", defval="EMA", options=["EMA", "SMA", "VWMA", "WMA"]) src = input(title="Source", type=input.source, defval=hl2) getMA(src, length) => ma = 0.0 if maInput == "EMA" ma := ema(src, length) if maInput == "SMA" ma := sma(src, length) if maInput == "VWMA" ma := vwma(src, length) if maInput == "WMA" ma := wma(src, length) ma getNMA(src, length1, length2) => lambda = length1 / length2 alpha = lambda * (length1 - 1) / (length1 - lambda) ma1 = getMA(src, length1) ma2 = getMA(ma1, length2) nma = (1 + alpha) * ma1 - alpha * ma2 nma = getNMA(src, length1, length2) //emaLength = input(90, minval=1, title="EMA Length") //emaSource = input(close, title="EMA Source") //ema = ema(emaSource, emaLength) plot(nma, title="NMA Black Line", linewidth=2, style=plot.style_stepline, color=color.black, transp=0) //plot(ema, title="EMA", linewidth=1, color=color.red, transp=0) //VWAP BANDS lenvwap = input(1, minval=1, title="VWAP Length") src1a = input(close, title="VWAP Source") offsetvwap = input(title="VWAP Offset", type=input.integer, defval=0, minval=-500, maxval=500) srcvwap = hlc3 vvwap = vwap(srcvwap) line1 = sma(src1a, lenvwap) plot(vvwap, color=#e91e63, linewidth=2, style=plot.style_line, title="VWAP MIDDLE") // Boll Bands emaSource = close emaPeriod = 20 devMultiple = 2 baseline = sma(emaSource, emaPeriod) plot(baseline, title = "BB Red Line", color = color.red) stdDeviation = devMultiple * (stdev(emaSource, emaPeriod)) upperBand = (baseline + stdDeviation) lowerBand = (baseline - stdDeviation) p1 = plot(upperBand, title = "BB Top", color = color.blue) p2 = plot(lowerBand, title = "BB Bottom", color = #311b92) fill(p1, p2, color = color.blue) //HULL TREND WITH KAHLMAN srchull = input(hl2, "Price Data") lengthhull = input(24, "Lookback") showcross = input(true, "Show cross over/under") gain = input(10000, "Gain") k = input(true, "Use Kahlman") hma(_srchull, _lengthhull) => wma((2 * wma(_srchull, _lengthhull / 2)) - wma(_srchull, _lengthhull), round(sqrt(_lengthhull))) hma3(_srchull, _lengthhull) => p = lengthhull/2 wma(wma(close,p/3)*3 - wma(close,p/2) - wma(close,p),p) kahlman(x, g) => kf = 0.0 dk = x - nz(kf[1], x) smooth = nz(kf[1],x)+dk*sqrt((g/10000)*2) velo = 0.0 velo := nz(velo[1],0) + ((g/10000)*dk) kf := smooth+velo a = k ? kahlman(hma(srchull, lengthhull), gain) : hma(srchull, lengthhull) b = k ? kahlman(hma3(srchull, lengthhull), gain) : hma3(srchull, lengthhull) c = b > a ? color.lime : color.red crossdn = a > b and a[1] < b[1] crossup = b > a and b[1] < a[1] p1hma = plot(a,color=c,linewidth=1,transp=75, title="Long Plot") p2hma = plot(b,color=c,linewidth=1,transp=75, title="Short Plot") fill(p1hma,p2hma,color=c,transp=55,title="Fill") plotshape(showcross and crossdn ? a : na, location=location.abovebar, style=shape.labeldown, color=color.red, size=size.tiny, text="Sell", textcolor=color.white, transp=0, offset=-1) plotshape(showcross and crossup ? a : na, location=location.belowbar, style=shape.labelup, color=color.green, size=size.tiny, text="Buy", textcolor=color.white, transp=0, offset=-1) //ALERTS alertcondition(crossup, title='Buy', message='Go Long') alertcondition(crossdn, title='Sell', message='Go Short')
프로필 이미지
파생돌이
2025-05-25
353
글번호 191143
지표
답변완료

키움 신호를 예스트레이더 검색식으로 변환 부탁드립니다.

수고 많으십니다. 가끔 여기 계시판을 통해 도움을 받고 있어 감사드립니다. 아래의 키움 쌍바닥 신호를 YesTrade 검색식으로 구현하고 싶습니다. 초보라 Valuewhen함수 사용이 어려워 문의 드립니다. 아래 수식을 변환 부탁드릴께요. S=sum(1); MA5 = avg(C, 기간1); MA20 = avg(C, 기간2); GC2 = ValueWhen(2, CrossUp(MA5, MA20), S); DC1 = ValueWhen(1, CrossDown(MA5, MA20), S); GC1 = ValueWhen(1, CrossUp(MA5, MA20), S); 조건 = GC2 < DC1 and DC1 < GC1 and (GC1 - GC2) > 0 and (GC1 - GC2) < Candle; &#8203;조건 and !조건(1) candle 50
프로필 이미지
작은소망1
2025-05-25
313
글번호 191142
종목검색
답변완료

문의드립니다.

늘 노고에 감사드립니다. [청산 기본조건] 진입가 대비 100틱 이상 상승 (종가가 아니라 고가기준) 청산 기본조건을 만족했다는 전제로 30봉 이내에 RSI가 30 이상 하락하면 청산하는 청산식을 원합니다. 매도는 그 반대입니다. 감사합니다.
프로필 이미지
카르마다
2025-05-25
200
글번호 191141
시스템
답변완료

질문 부탁드립니다

주말 잘 보내셨길 바랍니다 text 관련 질문 하나 드려요 새로운 조건이 나왔을때는 0으로 표시하고 그 전은 1 (txtt1[1] 에는 1), 전전은 2 ... 이런식으로 text 표시를 하려고 아래 수식 for 문에 Text_SetString(txtt1[cnt],NumToStr(cnt,0)); 넣었는데요 다 0 으로 나오게 되네요 어디서 작성이 잘못 된건지 한 번 봐주셨으면 합니다 감사합니다 var : cnt(0), sum1(0), sumi1(0),summ(0),tt(0),hh(0),ll(0),tl(0),tl1(0),n(0),ae(0); var: sum2(0),sumi2(0),count(0),sumaa(0),sumai(0),avgaa(0); var : t(0),StartBarIndex(0),dd(0),d1(0),d2(0),e1(0),e2(0); Array : ii[50](0),aa[50](0),cc[50](0),ee[50](0),ttl[30](0),txtt[40](0),txtt1[40](0), tttl1[40](0),tttl2[40](0),sd[45](0),st[45](0),ad[50](0),at[50](0); if Bdate != Bdate[1] Then { DD = DD+1; } if (h>l*1.08) and (d1 == 0 or (d1 > 0 and dd >= d1+5)) Then { d1 = dd; hh = h; var1 = Index; Var2 = var1[1]; Var3 = Var2[1]; sum1=0; sumi1=0; sum2=0; sumi2=0; For cnt = 1 to (var1-Var2) { sum1=sum1+l[cnt]; sumi1=sumi1+1; } value1=sum1/sumi1; For cnt = 49 DownTo 1 { aa[cnt] = aa[cnt-1]; sd[cnt] =sd[cnt-1]; st[cnt] =st[cnt-1]; txtt[cnt] = txtt[cnt-1]; tttl1[cnt]=tttl1[cnt-1]; Text_SetString(txtt1[cnt],NumToStr(cnt,0)); } aa[0] = value1; sd[0] = sDate; st[0] = sTime; txtt1[0]=text_new(sd[0],st[0],aa[0],numToStr(0,0)); TL_SetExtRight( tttl1[6],False); tttl1[0] = TL_New(sd[7],st[7],aa[7],sd[3],st[3],aa[3]); TL_SetDrawMode( tttl1[0],0); TL_Delete( tttl1[6]); TL_SetExtRight( tttl1[0],true); }
프로필 이미지
yamu
2025-05-26
220
글번호 191140
지표