커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내

안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
프로필 이미지
예스스탁
2026-02-27
4351
글번호 230811
지표
답변완료

부탁드립니다

수고하십니다 예스로 수식부탁드립니다 //@version=6 indicator("MA Suite | Lyro RS", overlay= true) // Library import LyroRS/LMAs/1 as DynamicMAs // LyroRS v1.0 // Groups (For Inputs) ma_g = "&#120288;&#120290;&#120297;&#120284;&#120289;&#120282; &#120276;&#120297;&#120280;&#120293;&#120276;&#120282;&#120280;" signal_g = '&#120294;&#120284;&#120282;&#120289;&#120276;&#120287;&#120294;' colors_g = '&#120278;&#120290;&#120287;&#120290;&#120293;&#120294;' // Inputs // -- MA Inputs source = input.source(close, "Source", group= ma_g, tooltip= "S E ECT where the data originates (open, high, low, close, etc..).") ma_type = input.string("EMA", "S E ECT Moving Average", options=["SMA", "EMA", "WMA", "VWMA", "DEMA", "TEMA", "RMA", "HMA", "LSMA", "SMMA", "ALMA", "ZLSMA", "FRAMA", "KAMA", "JMA", "T3"], group=ma_g, tooltip="Choose a moving average to apply to the calculation.") ma_length = input.int(75, "Moving Average Length", group= ma_g, tooltip= "Defines the length or period of the S E ECTed moving average.") ma_lengthSmoothing = input.int(25, "MA - Smooth", group=ma_g) toleranceInputS = input.float(0.0025, "Tolerance - 1", group = ma_g, tooltip = "Tolerance for Support and Resistance", step = 0.0001) toleranceInputR = input.float(0.0025, "Tolerance - 2", group = ma_g, tooltip = "Tolerance for Rejection Signs", step = 0.0001) customRise = input.int(25, "Rising MA", group = ma_g, tooltip = "Change Resistance of Rising MA / Long to Short Term") // -- Display Inputs trend_type = input.string("Source Above MA", "S E ECT Trend Type", options=["Source Above MA", "Rising MA"], group=signal_g, tooltip="S E ECT a moving average trend following method.") d_sr_sigs = input.bool (true, "Display Support/Resistance Signs", group= signal_g, display=display.none, tooltip="Enables triangle signs to be displayed.") d_r_signs = input.bool (true, "Display Rejection Signs", group= signal_g, display=display.none, tooltip="Enables signs for Trend mode.") smoothingBool = input.bool (false, "Enable / Disable Smoothing", group= signal_g, display=display.none, tooltip="Enables or Disables smoothing.") // -- Color Inputs ColMode = input.string("Mystic", "Custom Color Palette", inline="D R OP", options=["Classic", "Mystic", "Accented", "Royal"], group=colors_g, tooltip="Choose a predefined color scheme for indicator visualization.") cpyn = input.bool(true, "Use Custom Palette", tooltip="Enable manual S E ECTion of custom colors for trend signals.", group=colors_g, display=display.none) cp_UpC = input.color(#00ff00, "Custom Up", inline="Custom Palette", tooltip="Set a custom color for bullish signals.", group=colors_g, display=display.none) cp_DnC = input.color(#ff0000, "Custom Down", inline="Custom Palette", tooltip="Set a custom color for bearish signals.", group=colors_g, display=display.none) // Colors color UpC = na color DnC = na switch ColMode "Classic" => UpC := #00E676 DnC := #880E4F "Mystic" => UpC := #30FDCF DnC := #E117B7 "Accented" => UpC := #9618F7 DnC := #FF0078 "Royal" => UpC := #FFC107 DnC := #673AB7 if cpyn UpC := cp_UpC DnC := cp_DnC smoothADD = ma_length + ma_lengthSmoothing // Moving Average Switch (Standard, No Volume Weighting) float ma = na switch ma_type "SMA" => ma := DynamicMAs.SMA(source, smoothingBool ? smoothADD : ma_length) "EMA" => ma := DynamicMAs.EMA(source, smoothingBool ? smoothADD : ma_length) "WMA" => ma := DynamicMAs.WMA(source, smoothingBool ? smoothADD : ma_length) "VWMA" => ma := DynamicMAs.VWMA(source, volume, smoothingBool ? smoothADD : ma_length) "DEMA" => ma := DynamicMAs.DEMA(source, smoothingBool ? smoothADD : ma_length) "TEMA" => ma := DynamicMAs.TEMA(source, smoothingBool ? smoothADD : ma_length) "RMA" => ma := DynamicMAs.RMA(source, smoothingBool ? smoothADD : ma_length) "HMA" => ma := DynamicMAs.HMA(source, smoothingBool ? smoothADD : ma_length) "LSMA" => ma := DynamicMAs.LSMA(source, smoothingBool ? smoothADD : ma_length, 0) "SMMA" => ma := DynamicMAs.SMMA(source, smoothingBool ? smoothADD : ma_length) "ALMA" => ma := DynamicMAs.ALMA(source, smoothingBool ? smoothADD : ma_length, 0, 20) "ZLSMA" => ma := DynamicMAs.ZLSMA(source, smoothingBool ? smoothADD : ma_length) "FRAMA" => ma := DynamicMAs.FRAMA(source, smoothingBool ? smoothADD : ma_length) "KAMA" => ma := DynamicMAs.KAMA(source, smoothingBool ? smoothADD : ma_length) "JMA" => ma := DynamicMAs.JMA(source, smoothingBool ? smoothADD : ma_length, 0) "T3" => ma := DynamicMAs.T3(source, smoothingBool ? smoothADD : ma_length, 0.5) toleranceCodeS = ma * toleranceInputS toleranceCodeR = ma * toleranceInputS // MA Touch (Support & Resistance) var float bandtouch_score = na if close > ma + toleranceCodeS and low < ma bandtouch_score := 1 // Support else if close < ma - toleranceCodeS and high > ma bandtouch_score := -1 // Resistance else bandtouch_score := 0 //-- Rejection (Bullish & Bearish Price Behavior) var float rejection_score = na bull_c = ta.crossover(close, ma + toleranceCodeR) // Bullish cross bear_c = ta.crossunder(close, ma - toleranceCodeR) // Bearish cross if bandtouch_score[1] == -1 and bull_c == true rejection_score := 1 else if bandtouch_score[1] == 1 and bear_c == true rejection_score := -1 else rejection_score := 0 // Plots pc = trend_type == "Source Above MA" ? (close > ma ? UpC : DnC) : trend_type == "Rising MA" ? (ma > ma[customRise] ? UpC : DnC) : na plot(ma, color = pc, title= "Moving Average") plot(ma, color = color.new(pc, 75), linewidth= 5, title= "Moving Average Glow", display = display.pane) plot(ma, color = color.new(pc, 80), linewidth= 10, title= "Moving Average Glow 2", display = display.pane) barcolor(pc, title= "Bar Color") // -- MA Touch Chars displays_MATC = d_sr_sigs ? display.pane : display.none plotchar(low, char='▲', color= bandtouch_score == 1 ? UpC : na, location=location.absolute, title= "Support Signals", display= displays_MATC, size= size.tiny) plotchar(high, char='▼', color= bandtouch_score == -1 ? DnC : na, location=location.absolute, title= "Resistance Signals", display= displays_MATC, size= size.tiny) // -- Rejection Shapes displays_rs = d_r_signs ? display.pane : display.none plotshape(ta.crossover(rejection_score, 0), title="Rejection Signal", location=location.belowbar, style=shape.labelup, text="&#120017;&#120062;&#120053;&#120053;&#120050;&#120060;&#120049; &#120033;&#120046;&#120051;&#120046;&#120044;&#120061;&#120050;&#120056;&#120055;", textcolor=#000000, size=size.small, color=UpC, force_overlay=true, display= displays_rs) plotshape(ta.crossunder(rejection_score, 0), title="Rejection Signal", location=location.abovebar, style=shape.labeldown, text="&#120017;&#120046;&#120042;&#120059;&#120050;&#120060;&#120049; &#120033;&#120046;&#120051;&#120046;&#120044;&#120061;&#120050;&#120056;&#120055;", textcolor=#000000, size=size.small, color=DnC, force_overlay=true, display= displays_rs)
프로필 이미지
파생돌이
2025-09-05
1015
글번호 193751
지표
답변완료

93959글 다음 사항 좀 추가 요청 드림니다.

ㅇ 항상 많은 도움에 고맙 습니다. ㅇ 아래 수식에 다음 3가지 사항 좀 추가 요청 드림니다. 1. "hh","hl","LL"등등 신호발생시 강조수식 요청 (하이킨 아시) ## Var10 = MA(C,20) ; ## 여기에 아래 수식 적용 방식을 모르겠습니다. if (H+L) / 2 >= Var10 Then { PlotPaintBar(O-PriceScale*0 , C-PriceScale*0 ,"강조",Rgb(255,0,0),Def,7); PlaySound("C:KiwoomGlobalsoundsound8.wav"); } if (H+L) / 2 < Var10 Then { PlotPaintBar(O-PriceScale*0 , C-PriceScale*0 ,"강조",Rgb(0,125,0),Def,7); PlaySound("C:KiwoomGlobalsoundsound10.wav"); } 2. "hh","hl","LL"등등 신호발생시 수직선 및 소리음 어디에 넣어야 하나요? 3. C[1]까지 연결선( 신호없는 반대편 마지막 부터 C[1] 까지 연결선) ## 아래 수식 input : prd(20); input : baseAPT(20); input : useAdapt(false); input : volBias(10.0); input : highS(Blue); input : lowS(red); input : S(Blue); input : R(red); input : xx(2); var : b(0); var : ph(Nan),pl(Nan),phl(0),plL(0),prev(Nan),dir(0); var : atrLen(50); var : aha(0),atr(0),apa(0),atrAvg(0),ratio(0); var : aptRaw(0),aptClamped(0),aptSeries(0); var : hlc3(0),p(0),vol(0); b = index; ph = iff(nthhighestbar(1,high, prd) == 0 , high , ph); pl = iff(nthlowestbar(1,low, prd) == 0 , low , pl); phL = iff(nthhighestbar(1,high, prd) == 0 , b , phL); plL = iff(nthlowestbar(1,low, prd) == 0 , b , plL); dir = iff(phL > plL , 1 , -1); aha = 1 / atrLen ; atr = IFf(IsNan(atr[1]) == true, ma(TrueRange,atrLen) , aha * TrueRange + (1 - aha) * IFf(isnan(atr[1])==true,0,atr[1])); apa = 1/atrLen; atrAvg = IFf(IsNan(atrAvg[1]) == true , ma(atr, atrLen) , apa * atr + (1 - apa) * iff(IsNan(atrAvg[1]) == true,0,atrAvg[1])); ratio = iff(atrAvg > 0 , atr / atrAvg , 1.0); aptRaw = iff(useAdapt , baseAPT / pow(ratio, volBias) , baseAPT); aptClamped = max(5.0, min(300.0, aptRaw)); aptSeries = round(aptClamped,0); hlc3 = (h+l+c)/3; if Index == 0 Then { P = hlc3 * volume; vol = volume; } var : x(0),y(0),loc(0),col(0),txt(""),barsback(0),vap(0),i(0); var : apt_i(0),alpha(0),pxv(0),v_i(0),vappe(0),decay(0),apt_0(0),v0(0); var : aa(0),tx(0),txx(0); if dir != dir[1] Then { x = iff(dir > 0 , plL , phL); y = iff(dir > 0 , pl , ph); loc = iff(dir > 0 , 0,1); col = iff(dir > 0 , highS , lowS); if dir > 0 and pl < prev Then txt = "LL"; Else { if dir > 0 and pl > prev Then txt = "HL"; Else { if dir < 0 and ph < prev Then txt = "LH"; Else { if dir < 0 and ph > prev Then txt = "HH"; Else txt = ""; } } } tx = Text_New(sDate[Index-x],sTime[Index-x],y,txt); Text_SetStyle(tx,2,loc); Text_SetColor(tx,col); prev = iff(dir > 0 , ph[1] , pl[1]); barsback = b - x; p = y * volume[barsback]; vol = volume[barsback]; vap = p / vol; for i = barsback downto 0 { apt_i = aptSeries[i]; decay = exp(-log(2.0) /max(1.0, apt_i)); alpha =1.0 - decay; pxv = hlc3[i] * volume[i]; v_i = volume[i]; p = (1.0 - alpha) * p + alpha * pxv; vol = (1.0 - alpha) * vol + alpha * v_i; vappe = iff(vol > 0 , p / vol , Nan); txx = Text_New(sDate[i],sTime[i],vappe,"·"); Text_SetStyle(txx,2,2); Text_SetSize(txx,18); Text_SetColor(txx,iff(dir > 0 , R , S)); } } else { apt_0 = aptSeries; decay = exp(-log(2.0) /max(1.0, apt_0)); alpha =1.0 - decay; pxv = hlc3 * volume; v0 = volume; p = (1.0 - alpha) * p + alpha * pxv; vol = (1.0 - alpha) * vol + alpha * v0; vap = iff(vol > 0 , p / vol , Nan); txx = Text_New(sDate,sTime,vap,"·"); Text_SetStyle(txx,2,2); Text_SetSize(txx,18); Text_SetColor(txx,iff(dir > 0 , R , S)); } ㅇ 항상 많은 도움 고맙습니다. 좋은 한주 되십시요.
프로필 이미지
요타
2025-09-08
358
글번호 193750
지표
답변완료

94129 번 관련 추가 부탁입니다.

94129번에 대한 감사하다는 답변과 추가로 시스템에 매수진입과 매도진입관련 문의를 드렸으나 목록이 지나가 보지 못하는 것 같아 다시 한번더 부탁을 드립니다. 변환시켜 주시면 바로 시스템에 적용할 수 있을 것으로 생각했는데 아직도 실력이 부족한가 봅니다. buy = sqzOff and val > 0 ; sell = sqzOff and val < 0 ; 이렇게 적용하였더니 논리값(참/거짓)이나 논리표현식이 와야 한다는 메세지가 뜹니다. 한번더 바르게 잡아 주시면 고맙겠습니다.
프로필 이미지
하날랑
2025-09-05
321
글번호 193749
시스템

가자아이 님에 의해서 삭제되었습니다.

프로필 이미지
가자아이
2025-09-08
50
글번호 193748
지표

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

프로필 이미지
dla1224
2025-09-05
0
글번호 193747
지표
답변완료

종목 검색 부탁드립니다.

crossup(c,((predayhigh()+predaylow()+ predayclose())/3)+(predayhigh()-predaylow())) 돌파 종목 검색식 부탁드립니다
프로필 이미지
골든도라도
2025-09-05
227
글번호 193746
종목검색
답변완료

종목검색식 부탁드립니다

1. 다음 화살표 수식을 일봉 (0봉전)종목 검색식으로 부탁드려요 2. 다음 화살표 수식을 0봉전 ~10봉전까지의 모든 종목 검색식 부탁드립니다. -------------- smoothADD = ma_length + if(smoothingBool, ma_lengthSmoothing, 0); MS = if(ma_type == 1, ma(C, smoothADD), if(ma_type == 2, eavg(C, smoothADD), if(ma_type == 3, ma(C, smoothADD,가중), eavg(C, smoothADD)))); tolerance_R = MS * toleranceInputR; PREV_BELOW = C(1) <= MS(1) + tolerance_R; CURR_ABOVE = C > MS + tolerance_R; PREV_BELOW AND CURR_ABOVE - 지표조건설정 ma_length : 60 ma_lengthSmoothing : 20 smoothingBool : 0 ma_type : 1 toleranceInputR : 0.0025 ---------------------------------------------------------------------------- 3. 아래 수식을 참고하여(하단), 일봉기준차트에 주봉 10일 이평선을(단순) 긋고, 일봉차트에서 주봉 10일 이평선이(단순) 아래 (수식1)의 이평선을 돌파할때 종목 검색식 부탁드려요. 4. 아래 수식을 참고하여(하단), 일봉기준차트에 주봉 10일 이평선을(단순) 긋고, 일봉차트에서 주봉 10일 이평선이(단순) 아래 (수식1)의 이평선을 돌파할때 0봉전 ~ 10봉전까지의 모든종목 검색식 부탁드려요. 5. 아래 수식을 참고하여(하단), 일봉기준차트에 주봉 10일 이평선을(단순) 긋고, 일봉차트에서 주봉 10일 이평선(단순)과 아래 (수식1)의 이평선이 (수식1)의 이평선을 기준으로, 상하 1%이내 수렴 했을때 모든종목 검색식 부탁드려요. 6. 아래 수식을 참고하여(하단), 일봉기준차트에 주봉 10일 이평선을(단순) 긋고, 일봉차트에서 양봉 캔들이(꼬리 몸통 모두 포함) 주봉 10일 이평선과(단순), 아래(수식1)의 이평선을 캔들이 양봉(꼬리몸통 모두) 으로 동시돌파할때 종목 검색식 부탁합니다. 7. 아래 수식을 참고하여(하단), 일봉기준차트에 주봉 10일 이평선을(단순) 긋고, 캔들이 종가기준, 주봉 10일 이평선(단순) 위에 있고 아래(수식1)의 이평선 기준 상단 1% 아래에 있는 모든종목 검색식 부탁합니다. 8. 아래수식을 참고하여 (하단), (수식1) 이 상승추세로 돌아설때 종목검색식 부탁드려요. ---아래--- (수식1) 이평 smoothADD = ma_length + if(smoothingBool, ma_lengthSmoothing, 0); MS = if(ma_type == 1, ma(C, smoothADD), if(ma_type == 2, eavg(C, smoothADD), if(ma_type == 3, ma(C, smoothADD,가중), eavg(C, smoothADD)))); MS (수식2) 상승 if(MS(1)<MS,MS,0) (수식3) 하락 if(MS(1)>=MS,MS,0) - 지표조건설정 ma_length : 80 ma_lengthSmoothing : 20 smoothingBool : 0 ma_type : 2
프로필 이미지
일지매7
2025-09-08
285
글번호 193745
종목검색
답변완료

검색식 부탁드려요 항상 감사합니다.

스토캐스틱의 전고점(K값)을 형성한후 하락한 다음 그 전고점을 돌파하는 검색식 부탁드립니다. 감사합니다. // Sto(12,5,) 최근 20봉 내 스윙하이 전고점 돌파 Input : P(12), Ksm(5), LB(20); Var : K(0), swingHigh(-1), cond(false), n(0); // Sto K K = StochasticsK(P, Ksm); // 최근 LB봉 안에서 "가장 가까운 스윙하이" 찾기 swingHigh = -1; For n = 2 To LB-1 Begin If (K[n] > K[n+1]) and (K[n] > K[n-1]) and (swingHigh = -1) Then swingHigh = K[n]; // 첫 발견된 스윙하이 저장 후 종료 End; // 오늘 K가 그 스윙하이 값 돌파 cond = (swingHigh > 0) and CrossUp(K, swingHigh); If cond Then Find(1);
프로필 이미지
하이모리
2025-09-05
287
글번호 193744
종목검색
답변완료

문의 드립니다.

안녕하세요 ~ 현재 가격/또는 캔들이 아래의 2개 라인을 동시에 돌파하는 종목의 검색식을 부탁 드립니다. 1. (((highest(high,longPeriod)+lowest(low,longPeriod))/2 +BBandsDown(midPeriod,D1))/2 +daylow())/2 지표조건 shortPeriod 5 midPeriod 15 longPeriod 30 D1 2 2. (highest(high,midPeriod)+lowest(low,midPeriod) +highest(high,shortPeriod)+lowest(low,shortPeriod) +highest(high,longPeriod)+lowest(low,longPeriod))/6 지표조건 shortPeriod 8 midPeriod 24 longPeriod 49 감사합니다.
프로필 이미지
ikksoo
2025-09-05
228
글번호 193743
검색