커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

정밀타격수 님에 의해서 삭제되었습니다.

프로필 이미지
정밀타격수
2018-03-22
10
글번호 117635
시스템
답변완료

문의드립니다.

매번 감사합니다. 1. 기타 코딩 변환 부탁드립니다. inputs: Price( Close ), { price of which the standard deviation is calculated } Length( 90 ), { number of bars used in average true range (ATR) and standard deviation (SD) calculations } nK( 3 ), { number of ATRs to add to average to form Keltner channel } nBB( 2 ), { number of standard deviations used to calculate Bollinger bands } AlertLine( 1 ), { Bollinger band squeeze indicator (BBS_Ind) level at which to issue alerts } TargetPctOfRange( 100 ) ; { percentage of width of rectangle at which to place profit target } variables: Rectangle( false ), ATR( 0 ), SDev( 0 ), BBS_Ind( 0 ), RectangleTop( 0 ), RectangleBase( 0 ), RectangleRange( 0 ) ; if MarketPosition <> 0 then Rectangle = false ; { Calculate Bollinger band squeeze indicator } ATR = AvgTrueRange( Length ) ; SDev = StandardDev( Price, Length, 1 ) ; if nK <> 0 and ATR <> 0 then begin BBS_Ind = ( nBB * SDev ) / ( nK * ATR ) ; if BBS_Ind crosses under AlertLine and Rectangle = false and MarketPosition = 0 then begin RectangleTop = Highest( Close, Length ) ; RectangleBase = Lowest( Close, Length ) ; RectangleRange = RectangleTop - RectangleBase ; Rectangle = true ; end ; end ; if Rectangle = true then begin if Close >= RectangleTop then Buy this bar Close else if Close <= RectangleBase then Sell short this bar at Close ; end ; if MarketPosition = 1 then begin if Close >= RectangleTop + 0.01 * TargetPctOfRange * RectangleRange then Sell( “LX PT” ) this bar at Close ; if Close <= RectangleTop - .5 * RectangleRange then Sell( “LX SL” ) this bar at Close ; end else if MarketPosition = -1 then begin if Close <= RectangleBase - 0.01 * TargetPctOfRange * RectangleRange then BuyToCover( “SX PT” ) this bar at Close ; if Close >= RectangleBase + .5 * RectangleRange then Buy to cover( “SX SL” ) this bar at Close ; end ; Indicator: RectangleEvaluation {Rectangle definition: See comments in code for strategy “RectangleBreakout”. } inputs: Price( Close ), { price of which the standard deviation is calculated } Length( 90 ), { number of bars used in average true range (ATR) and standard deviation (SD) calculations } nK( 3 ), { number of ATRs to add to average to form Keltner channel } nBB( 2 ), { number of standard deviations used to calculate Bollinger bands } AlertLine( 1 ), { Bollinger band squeeze indicator (BBS_Ind) level at which to issue alerts } TargetPctOfRange( 100 ) ; { percentage of width of rectangle at which to place profit target } variables: ATR( 0 ), SDev( 0 ), BBS_Ind( 0 ), Rectangle( false ), LongPosition( false ), ShortPosition( false ), RectangleTop( 0 ), RectangleBase( 0 ), RectangleRange( 0 ), LongTarget( 0 ), LongPositionCount( 0 ), ShortTarget( 0 ), ShortPositionCount( 0 ), LongTargetCount( 0 ), ShortTargetCount( 0 ) ; { Calculate Bollinger band squeeze indicator } ATR = AvgTrueRange( Length ) ; SDev = StandardDev( Price, Length, 1 ) ; if nK <> 0 and ATR <> 0 then begin BBS_Ind = ( nBB * SDev ) / ( nK * ATR ) ; if BBS_Ind crosses under AlertLine and Rectangle = false and LongPosition = false and ShortPosition = false then begin RectangleTop = Highest( Close, Length ) ; RectangleBase = Lowest( Close, Length ) ; RectangleRange = RectangleTop - RectangleBase ; Rectangle = true ; Plot1( Close, “Alert” ) ; end ; end ; if RectangleTop <> 0 and Rectangle = true then begin Plot2( RectangleTop, “Top” ) ; Plot3( RectangleBase, “Base” ) ; end ; if Rectangle = true then begin if Close crosses over RectangleTop then begin LongTarget = RectangleTop + 0.01 * TargetPctOfRange * RectangleRange ; Rectangle = false ; LongPosition = true ; LongPositionCount = LongPositionCount + 1 ; end ; if Close crosses under RectangleBase then begin ShortTarget = RectangleBase - 0.01 * TargetPctOfRange * RectangleRange ; Rectangle = false ; ShortPosition = true ; ShortPositionCount = ShortPositionCount + 1 ; end ; end ; if LongPosition = true then begin if Close > LongTarget then begin LongTargetCount = LongTargetCount + 1 ; LongPosition = false ; end else if Close < RectangleTop - .5 * RectangleRange then LongPosition = false ; Plot4( LongTarget, “Tgt” ) ; end else if ShortPosition = true then begin if Close < ShortTarget then begin ShortTargetCount = ShortTargetCount + 1 ; ShortPosition = false ; end else if Close > RectangleBase + .5 * RectangleRange then ShortPosition = false ; Plot4( ShortTarget, “Tgt” ) ; end ; Indicator: Rectangle-RS {Rectangle definition: See comments in code for strategy “RectangleBreakout”. } inputs: Price( Close ), { price of which the standard deviation is calculated } Length( 90 ), { number of bars used in average true range (ATR) and standard deviation (SD) calculations } nK( 3 ), { number of ATRs to add to average to form Keltner channel } nBB( 2 ), { number of standard deviations used to calculate Bollinger bands } AlertLine( 1 ), { Bollinger band squeeze indicator (BBS_Ind) level at which to issue alerts } TargetPctOfRange( 100 ) ; { percentage of width of rectangle at which to place profit target } variables: ATR( 0 ), SDev( 0 ), BBS_Ind( 0 ), Rectangle( false ), LongPosition( false ), ShortPosition( false ), RectangleTop( 0 ), RectangleBase( 0 ), RectangleRange( 0 ), LongTarget( 0 ), LongPositionCount( 0 ), ShortTarget( 0 ), ShortPositionCount( 0 ), LongTargetCount( 0 ), ShortTargetCount( 0 ), LongTgtHitRatio( 0 ), ShortTgtHitRatio( 0 ) ; { Calculate Bollinger band squeeze indicator } ATR = AvgTrueRange( Length ) ; SDev = StandardDev( Price, Length, 1 ) ; if nK <> 0 and ATR <> 0 then begin BBS_Ind = ( nBB * SDev ) / ( nK * ATR ) ; if BBS_Ind crosses under AlertLine and Rectangle = false and LongPosition = false and ShortPosition = false then begin RectangleTop = Highest( Close, Length ) ; RectangleBase = Lowest( Close, Length ) ; RectangleRange = RectangleTop - RectangleBase ; Rectangle = true ; end ; end ; if RectangleTop <> 0 and Rectangle = true then begin Plot2( RectangleTop, “Top” ) ; Plot3( RectangleBase, “Base” ) ; end ; if Rectangle = true then begin if Close crosses over RectangleTop then begin LongTarget = RectangleTop + 0.01 * TargetPctOfRange * RectangleRange ; Rectangle = false ; LongPosition = true ; LongPositionCount = LongPositionCount + 1 ; end ; if Close crosses under RectangleBase then begin ShortTarget = RectangleBase - 0.01 * TargetPctOfRange * RectangleRange ; Rectangle = false ; ShortPosition = true ; ShortPositionCount = ShortPositionCount + 1 ; end ; end ; if LongPosition = true then begin if Close > LongTarget then begin LongTargetCount = LongTargetCount + 1 ; LongPosition = false ; end else if Close < RectangleTop - .5 * RectangleRange then LongPosition = false ; end else if ShortPosition = true then begin if Close < ShortTarget then begin ShortTargetCount = ShortTargetCount + 1 ; ShortPosition = false ; end else if Close > RectangleBase + .5 * RectangleRange then ShortPosition = false ; end ; if LongPositionCount > 0 then begin LongTgtHitRatio = LongTargetCount / LongPositionCount ; Plot5( LongTgtHitRatio, “LongTgtRatio” ) ; end ; if ShortPositionCount > 0 then begin ShortTgtHitRatio = ShortTargetCount / ShortPositionCount ; Plot6( ShortTgtHitRatio, “ShrtTgtRatio” ) ; end ;
프로필 이미지
잡다백수
2018-03-22
308
글번호 117634
시스템
답변완료

수식 부탁드립니다.

질문 01) 현재가가 전일 고점 돌파중인 종목 검색식 질문 02) 현재가가 전일 위에 있는 종목 검색식
프로필 이미지
gaara
2018-03-22
165
글번호 117626
종목검색
답변완료

당일 것 print 어떻게 하나요?

print해서 csv파일 저장했는데 확인 해 보니 당일 이전 것 모두 출력되서 데이터 저장하는게 좀 번거러운데요 오늘것만 출력할 수 없을까요
프로필 이미지
수급돌파
2018-03-22
197
글번호 117622
지표
답변완료

문의드립니다.

현재쓰고 있는 지표식입니다. 첨부파일 처럼 흰색박스를 그리고 싶습니다. input : N(3); if C > O Then var1 = 1; if C < O Then var1 = -1; value1 = CountIF(var1 == 1,N); Value2 = CountIF(var1 == -1,N); if var1 == -1 and value1[1] == N Then Value3 = L[3]; if var1 == 1 and value2[1] == N Then value4 = H[3]; plot1(value3); plot2(value4);
프로필 이미지
진팡이
2018-03-22
244
글번호 117613
지표
답변완료

문의드려요

분할진입 분할청산하는 로직에서 맨마지막에 일어난 가격을 알고싶습니다. LatestEntryPrice와 LatestExitprice 중에서도 가장 최근에 이루어진 가격을 구해주세요.
프로필 이미지
팽구
2018-03-22
144
글번호 117612
시스템
답변완료

일봉 스토캐스틱 20.1 선이 20이상인 종목 검색식 부탁합니다.

기본적으로 있는건 추세나 골든크로스, 특정 값만 검색되는듯 합니다. 일봉 기준 스토캐스틱 20.1 선이 20이상인 종목 검색식 부탁드립니다.
프로필 이미지
신데렐라맨
2018-03-22
172
글번호 117611
종목검색
답변완료

문의 드립니다.

질문1) 다른 주기의 차트에 10분봉차트의 첫봉의 시,고,저,종가를 표시하고자 합니다. 5분봉차트는 data10 이고 반드시 5분봉 첫봉 하나만의 시가,고가,저가,종가를 수식으로 표현하는 방법을 부탁드립니다. 질문2) 가령 조건이 condtion1 , condition2, condition3 과 같이 여러 개가 있을 때 조건만족의 캔들이 condtion1이 가장 빠르고 그 다음에 condition2의 캔들, 그 다음 condition3의 캔들 순서로 순차적으로 만족되는 경우를 수식으로 표현하는 방법 좀 알려 주십시오.
프로필 이미지
이심전심
2018-03-22
178
글번호 117609
지표
답변완료

일봉에서 분봉참조

안녕하세요. 1분봉데이터에서 과거 일봉데이터를 참조해서 지표를 그리고있습니다. 메인차트는 1분봉이고, data2로 같은 종목의 일봉을 참조했는데요 과거데이터를 참조했으니 당일 실시간 변화에도 지표는 그대로 있어야하는데 호가가 바뀔때마다 이상한 값이 같이 찍혀서 지표가 왜곡되네요 ㅠㅠ 어떻게 해결해야할까요? 해당종목은 kodex 코스닥 150 레버리지입니다. Var : 비중(0); 비중=0; if data2(C[1]) > data2(ma(c,3)[1]) Then {비중 = 비중+1;} if data2(c[1]) > data2(ma(c,7)[1]) Then {비중 = 비중+1;} if data2(c[1]) > data2(ma(c,15)[1]) Then {비중 = 비중+1;} if data2(c[1]) > data2(ma(c,30)[1]) Then {비중 = 비중+1;} if data2(c[1]) > data2(ma(c,60)[1]) Then {비중 = 비중+1;} 비중 = 비중/5; //gap=0; //gap = data2(HighD(1))-data2(lowD(1)); MessageLog("60평균 %.2f",data2(ma(c,60)[1])); var2=비중; plot2(var2,"비중");
프로필 이미지
깅창
2018-03-22
194
글번호 117601
지표