커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

수식문의

수고하십니다. 1번 종목검색(일봉 500봉기준) 및 2번 지표가 구현이 안됩니다. 검토 부탁드립니다 1.종목검색 Input : Change(240);#240일 Input : Mult1(1.03),Mult2(0.5),DV(100000); Array : HD[10](0),HT[10](0),HV[10](0); Array : LD[10](0),LT[10](0),LV[10](0); Var : Cnt(0),Hprice(0),Lprice(0); Var : UpTrend(false),DownTrend(False),Trend(0); Var : ZigZagTL(0); HPrice = H; LPrice = L; if Index == 0 Then { HD[0] = sDate; HT[0] = sTime; HV[0] = HPrice; LD[0] = sDate; LT[0] = sTime; LV[0] = LPrice; } Else { UpTrend = HPrice >= Highest(HPrice,Change)[1]; DownTrend = LPrice <= Lowest(LPrice,Change)[1]; if Trend <= 0 and UpTrend == true Then { Trend = 1; For cnt = 9 DownTo 1 { HD[cnt] = HD[cnt-1]; HT[cnt] = HT[cnt-1]; HV[cnt] = HV[cnt-1]; } HD[0] = sDate; HT[0] = sTime; HV[0] = HPrice; Condition1 = False; } Else if Trend >= 0 and DownTrend Then//하락추세 전환 { Trend = -1; For cnt = 9 DownTo 1 { LD[cnt] = LD[cnt-1]; LT[cnt] = LT[cnt-1]; LV[cnt] = LV[cnt-1]; } LD[0] = sDate; LT[0] = sTime; LV[0] = LPrice; } Else { if Trend == 1 Then { if HPrice > HV[0] Then { HD[0] = sDate; HT[0] = sTime; HV[0] = HPrice; } if Condition1 == False and C > TL_GetValue(ZigZagTL,sDate,sTime) and TL_GetValue(ZigZagTL,sDate,sTime) > L Then { Condition1 = true; if C > DayOpen and C >= DayClose(1)*Mult1 and DayVolume(0) >= DV and DayVolume(0)>DayVolume(1)*mult2 and Asks > Bids Then Find(1); } } if Trend == -1 Then { if LPrice < LV[0] Then { LD[0] = sDate; LT[0] = sTime; LV[0] = LPrice; } } } } 2.지표 Input : Change(240); Array : HD[10](0),HT[10](0),HV[10](0); Array : LD[10](0),LT[10](0),LV[10](0); Var : cnt(0),Hprice(0),Lprice(0); Var : UpTrend(false),DownTrend(False),Trend(0); Var : ZigZagTL(0),tx(0); HPrice = H; LPrice = L; if Index == 0 Then { HD[0] = sDate; HT[0] = sTime; HV[0] = HPrice; LD[0] = sDate; LT[0] = sTime; LV[0] = LPrice; } Else { UpTrend = HPrice >= Highest(HPrice,Change)[1]; DownTrend = LPrice <= Lowest(LPrice,Change)[1]; if Trend <= 0 and UpTrend == true Then { Trend = 1; For Cnt = 9 DownTo 1 { HD[Cnt] = HD[Cnt-1]; HT[Cnt] = HT[Cnt-1]; HV[Cnt] = HV[Cnt-1]; } HD[0] = sDate; HT[0] = sTime; HV[0] = HPrice; TL_SetExtRight(ZigZagTL,False); ZigZagTL = TL_New(LD[0],LT[0],LV[0],HD[0],HT[0],HV[0]); TL_SetColor(ZigZagTL,Red); TL_SetSize(ZigZagTL,1); TL_SetExtRight(ZigZagTL,true); Condition1 = False; } Else if trend >= 0 and DownTrend Then//하락추세 전환 { Trend = -1; For Cnt = 9 DownTo 1 { LD[Cnt] = LD[Cnt-1]; LT[Cnt] = LT[Cnt-1]; LV[Cnt] = LV[Cnt-1]; } LD[0] = sDate; LT[0] = sTime; LV[0] = LPrice; TL_SetExtRight(ZigZagTL,False); ZigZagTL = TL_New(HD[0],HT[0],HV[0],LD[0],LT[0],LV[0]); TL_SetColor(ZigZagTL,Blue); TL_SetSize(ZigZagTL,1); TL_SetExtRight(ZigZagTL,true); } Else { if Trend == 1 Then { if HPrice > HV[0] Then { HD[0] = sDate; HT[0] = sTime; HV[0] = HPrice; TL_SetEnd(ZigZagTL,HD[0],HT[0],HV[0]); } if Condition1 == False and C > TL_GetValue(ZigZagTL,sDate,sTime) and TL_GetValue(ZigZagTL,sDate,sTime) > L Then { Condition1 = true; Var1 = L; } } if Trend == -1 Then { if LPrice < LV[0] Then { LD[0] = sDate; LT[0] = sTime; LV[0] = LPrice; TL_SetEnd(ZigZagTL,LD[0],LT[0],LV[0]); } } } } if Var1 > 0 Then Plot1(Var1,"매수");
프로필 이미지
심홍
2023-09-06
1110
글번호 172225
종목검색
답변완료

키움 수식 변환 부탁드립니다.

수고가 많으십니다. <키움의 신호수식>의 일부분입니다. Ts_sum=sum(Ts>Ts(1), 연속상승)==연속상승; Ts>T && T>M1 && Ts_sum(1) && CrossUp(C,Ts) 이 일부분을 <예스수식>으로 input: 연속상승(20); var: 상승(0), Ts_sum(false); if Ts>Ts[1] Then 상승=1; Else 상승=0; Ts_sum=AccumN(상승,연속상승)==연속상승; if Ts>T && T>M1 && Ts_sum[1] && CrossUp(C, Ts) Then Find(1); 이렇게 작성했는데 맞는지요? 만약에 틀리다면 수정해주시면 감사하겠습니다.
프로필 이미지
알리바바
2023-09-06
1083
글번호 172224
종목검색

알리바바 님에 의해서 삭제되었습니다.

프로필 이미지
알리바바
2023-09-06
4
글번호 172223
종목검색
답변완료

진입횟수 문의 드립니다.

항상 도움 감사드립니다. 코스피 1분봉 거래에서 매수 조건이A,B가 있습니다. if A then buy ("A매수"); if B then buy ("B매수"); 위에 조건에서 "A매수"는 하루기준으로 몇번이고 진입해도 상관없지만 "B매수"는 하루중에 조건 만족이 여러번 되어도 조건이 만족하는 최초 한번만 진입하고 싶습니다. 시스템식으로 어떻게 구현해야 하는지 문의드립니다.
프로필 이미지
비정성시
2023-09-06
843
글번호 172222
시스템

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

프로필 이미지
회원
2023-09-06
36
글번호 172221
지표
답변완료

지표구현문의드립니다

아래 코드는 트레이딩뷰에 있는 지표중에 Relative Trend Index 라는 지표의 코드입니다. 혹시 시그널메이커로 지표의 구현이 가능할까요? // This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/ // ? Zeiierman //@version=5 indicator('Relative Trend Index (RTI) by Zeiierman', shorttitle= "RTI", overlay=false, precision=0) // Inputs { trend_data_count = input.int(100, step=4, minval=10, title="Trend Length", inline = "RT", group="Relative Trend Index [RTI]", tooltip="This variable determines the number of data points used in the calculation. In short: A high value returns the long-term trend and a low value returns the short-term trend. If a user increases the 'Trend Length', the trend will take into account a larger number of data points. This makes the trends smoother and more resistant to sudden changes in the market, as they're based on a broader set of data. It also makes the trends slower to react to recent changes, as they're diluted by older data. On the other hand, if a user decreases the 'Trend Length', the trend will take into account fewer data points. This could make the trends more responsive to recent market changes, as they're based on a narrower set of data. It also makes the trends more susceptible to noise and rapid fluctuations, as each new piece of data has a greater impact.") trend_sensitivity_percentage = input.int(95, step=1,minval=50, maxval=98,title='Sensitivity????', inline = "RT1", group="Relative Trend Index [RTI]", tooltip="This variable determines the specific indices in the sorted trend arrays that are used for the upper and lower trend. It's used as a percentage of the 'Trend length'. If a user increases the 'Sensitivity', the trend will be based on higher and lower positions in the sorted arrays, respectively. This makes the trend less sensitive. Conversely, if a user decreases the 'Sensitivity', the trend will be based on positions closer to the middle of the sorted arrays. This makes the trend more sensitive.") signal_length = input.int(20, step=1,minval=1, maxval=200,title='Signal Length', inline = "", group="Signal Line", tooltip="Set the Ma period.") ob = input.float(80, step=1, minval=0, maxval=100, title="", inline = "obos", group="Overbought/Oversold", tooltip="") os = input.float(20,step=1, minval=0, maxval=100,title="", inline = "obos", group="Overbought/Oversold", tooltip="Set the OB/OS levels.") //~~~~~~~~~~~~~~~~~~~~~~~} // Relative Trend Index Calculation { upper_trend = close + ta.stdev(close, 2) lower_trend = close - ta.stdev(close, 2) upper_array = array.new(0) lower_array = array.new(0) for i = 0 to trend_data_count - 1 upper_array.push(upper_trend[i]) lower_array.push(lower_trend[i]) upper_array.sort() lower_array.sort() upper_index = math.round(trend_sensitivity_percentage / 100 * trend_data_count) - 1 lower_index = math.round((100 - trend_sensitivity_percentage) / 100 * trend_data_count) - 1 UpperTrend = upper_array.get(upper_index) LowerTrend = lower_array.get(lower_index) RelativeTrendIndex = ((close - LowerTrend) / (UpperTrend - LowerTrend))*100 //~~~~~~~~~~~~~~~~~~~~~~~} // Plots { MA_RelativeTrendIndex = ta.ema(RelativeTrendIndex,signal_length) RT = plot(RelativeTrendIndex, 'Relative Trend Index (RTI)', color=color.new(color.teal, 0)) plot(MA_RelativeTrendIndex, 'Ma Relative Trend Index', color=color.new(#00bcd4, 0)) //~~~~~~~~~~~~~~~~~~~~~~~} // Line plots { mid = hline(50, 'Mid', color=#606060, linestyle=hline.style_dashed) overbought = hline(ob, 'Overbought', color=#606060, linestyle=hline.style_dashed) oversold = hline(os, 'Oversold', color=#606060, linestyle=hline.style_dashed) //~~~~~~~~~~~~~~~~~~~~~~~} // BG Fill { fill(overbought, oversold, color=color.new(color.teal, 90), title='Background') //~~~~~~~~~~~~~~~~~~~~~~~} // Overbought/Oversold Gradient Fill { midLinePlot = plot(50, color = na, editable = false, display = display.none) fill(RT, midLinePlot, 100, ob, top_color = color.new(color.green, 0), bottom_color = color.new(color.green, 100), title = "Overbought Gradient Fill") fill(RT, midLinePlot, os, 0, top_color = color.new(color.red, 100), bottom_color = color.new(color.red, 0), title = "Oversold Gradient Fill") //~~~~~~~~~~~~~~~~~~~~~~~} //Alerts { RT_OB_Over = ta.crossover(RelativeTrendIndex,ob) RT_OB_Under = ta.crossunder(RelativeTrendIndex,ob) RT_OS_Over = ta.crossover(RelativeTrendIndex,os) RT_OS_Under = ta.crossunder(RelativeTrendIndex,os) RT_Mid_Over = ta.crossover(RelativeTrendIndex,50) RT_Mid_Under = ta.crossunder(RelativeTrendIndex,50) RT_MA_Over = ta.crossover(RelativeTrendIndex,MA_RelativeTrendIndex) RT_MA_Under = ta.crossunder(RelativeTrendIndex,MA_RelativeTrendIndex) alertcondition(RT_OB_Over, title = "RTI Crossover OB", message = "RTI Crossover OB") alertcondition(RT_OB_Under, title = "RTI Crossunder OB", message = "RTI Crossunder OB") alertcondition(RT_OS_Over, title = "RTI Crossover OS", message = "RTI Crossover OS") alertcondition(RT_OS_Under, title = "RTI Crossunder OS", message = "RTI Crossunder OS") alertcondition(RT_Mid_Over, title = "RTI Crossover 50", message = "RTI Crossover 50") alertcondition(RT_Mid_Under,title = "RTI Crossunder 50", message = "RTI Crossunder 50") alertcondition(RT_MA_Over, title = "RTI Crossover Ma", message = "RTI Crossover Ma") alertcondition(RT_MA_Under, title = "RTI Crossunder Ma", message = "RTI Crossunder Ma")
프로필 이미지
잘하고프다
2023-09-06
1014
글번호 172220
지표
답변완료

부탁 드립니다.

AA= O>C && V(1)<V(0); BB= Valuewhen(1,if(AA,1,0),O); CrossUP(C,BB) && O<C 예스트레이더 신호로 전환좀 부탁 드립니다. 신호는 크고, 화이트 색으로 (화살표)로 표현이 가능 할까요? 부탁 드립니다.
프로필 이미지
hg950265
2023-09-06
1011
글번호 172219
강조
답변완료

함수요청

var1 = C-c[51]; Var2 = Ema(var1,9); plot1(var1-Var2); PlotBaseLine1(0); plot1 > 0이면 매수, plot < 0이면 매도 스크립트 작성 부탁드립니다.
프로필 이미지
흰둥이아빠
2023-09-06
1060
글번호 172218
시스템
답변완료

수식관련문의 드립니다.

매수목표가 A= 전일 저가>전전일 저가 B= 전일 거래량<3일 평균거래량 C= 전일종가< 20일 이평선 D= 시가+(전일고가-전일시가)*0.5 E= 전일종가와 20MA간 이격도가 105 초과시 시가매수 또는 지속보유 필터합성조건-> [{(A) OR (B)} AND (C) AND (D)] OR (E) 매도목표가 주식매수상태에서 E 조건 만족시 지속보유 E조건 만족 안할시 익일 시가매도. 구현해주시면 감사하겠습니다!
프로필 이미지
강건
2023-09-06
1129
글번호 172217
시스템