커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

1분봉

안녕하세요 1분봉에서 141000에 바이 주문인데 141058에 체결이됩니다. 정상인가요? Inputs : st(141000);//미국시간8+시카고시차14=한국22시 if sTime == st && MarketPosition == 0 Then Buy();
프로필 이미지
코퍼
2022-12-23
1306
글번호 164830
시스템
답변완료

수식문의

1. 특정일부터 20일동안 일봉 고가누적. " 저가누적. " 종가누적. " 시가누적. 2. 갭보정 차트에서 적용. 정상차트에서 적용 가능하게 부탁합니다.
프로필 이미지
대발이
2022-12-23
1299
글번호 164829
지표

대발이 님에 의해서 삭제되었습니다.

프로필 이미지
대발이
2022-12-23
1
글번호 164828
지표

하늘거지 님에 의해서 삭제되었습니다.

프로필 이미지
하늘거지
2022-12-23
9
글번호 164827
지표
답변완료

거래대금

분봉차트에서 최근 100봉 안에서 현제 거래대금이 최다 거래대금 순위로 따져서 5번째 안에 드는것을 찾고 싶어요 nthhighest(5,m,100) <<<< 이렇게 하니 안 나오네요
프로필 이미지
아무다
2022-12-23
1283
글번호 164826
종목검색
답변완료

수익률 계산 도출 과정

안녕하세요. 아래 사진과 같이 수익률은 계산식이 어떻게 될까요? 해당 전략은 1계약으로만 매수매도, 청산한 수식입니다. 항상 도움주셔서 감사합니다.
프로필 이미지
히익
2022-12-23
1211
글번호 164824
시스템
답변완료

추세선 박스 아래쪽으로

input : Period(130); Var:j(0),T(0); Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0), date21(0),date22(0),time21(0),time22(0), date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0); Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0); Array:r[7](0),fr[7](0),TL2[7](0),TL3[7](0),TX2[7](0),TX3[7](0); var : box(0),box1(0); Plot1(0); r[0] = 0; r[1] = 2; r[2] = 3.; r[3] = -1; r[4] = -2.; r[5] = 1; r[6] = 0.5; For j = 0 To 19 { HiBar[j] = HiBar[j] + 1; LoBar[j] = LoBar[j] + 1; } if crossup(c,highest(H,Period)[1]) Then T = 1; if CrossDown(c,Lowest(L,Period)[1]) Then T = -1; If T == -1 Then { If T[1] != -1 Then { For j = 18 DownTo 0 { LoVal[j+1] = LoVal[j]; LoBar[j+1] = LoBar[j]; } LoVal[0] = L; LoBar[0] = 0; date11 = date[HiBar[0]]; time11 = stime[HiBar[0]]; Value11 = HiVal[0]; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; date21 = date[HiBar[0]]; time21 = stime[HiBar[0]]; date22 = date[0]; time22 = stime[0]; for j = 0 to 6 { fr[j] = LoVal[1] + ((HiVal[0] - LoVal[1]) * r[j]); } box = box_new(date11,time11,Value11,date12,time12,Value12); Box_SetColor(box,Lime); Box_SetFill(box,true,40); Text_SetSize(tx,20); if abs(value12[1]-value11[1]) < 0.75 Then Text_Delete(tx); tx = text_new(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Blue); Text_SetStyle(tx,1,0); Text_SetSize(tx,30); Text_SetBold(tx,1); } If LoVal[0] > L Then { LoVal[0] = L; LoBar[0] = 0; date12 = date[LoBar[0]]; time12 = stime[LoBar[0]]; Value12 = LoVal[0]; date22 = date[0]; time22 = stime[0]; Box_SetEnd(box,date12,time12,Value12); Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } } If T == 1 Then { If T[1] != 1 Then { For j = 18 DownTo 0 { HiVal[j+1] = HiVal[j]; HiBar[j+1] = HiBar[j]; } HiVal[0] = H; HiBar[0] = 0; date11 = date[LoBar[0]]; time11 = stime[LoBar[0]]; Value11 = LoVal[0]; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; date31 = date[LoBar[0]]; time31 = stime[LoBar[0]]; date32 = date[0]; time32 = stime[0]; for j = 0 to 5 { fr[j] = LoVal[0] + ((HiVal[1] - LoVal[0]) * r[j]); } box = Box_New(date11,time11,Value11,date12,time12,Value12); Box_SetColor(box,Magenta); Box_SetFill(box,true,40); Text_SetSize(tx,20); if abs(value12[1]-value11[1]) < 0.75 Then Text_Delete(tx); tx = text_new(sDate,stime,value12,NumToStr(value12-value11,2)); Text_SetColor(Tx,Red); Text_SetStyle(tx,1,1); Text_SetSize(tx,30); Text_SetBold(tx,1); } If HiVal[0] < H Then { HiVal[0] = H; HiBar[0] = 0; date12 = date[HiBar[0]]; time12 = stime[HiBar[0]]; Value12 = HiVal[0]; TL_SetEnd(TL1, date12,time12,Value12); date32 = date[0]; time32 = stime[0]; Box_SetEnd(box,date12,time12,Value12); Text_SetString(tx,NumToStr(value12-value11,2)); Text_SetLocation(tx,sDate,sTime,value12); } } 차트쪽에 있는 추세선 박스를 변화없이 현재 모양과 기능 그대로, 아래의 보조지표 쪽으로 옮겨 다른 보조지표와 겹쳐서 함께 볼수 있을까요? 감사합니다.
프로필 이미지
고성
2022-12-25
1210
글번호 164821
지표
답변완료

고점선과 저점선을 표시하고 싶습니다.

안녕하세요. 선물 5분 차트에서 현재의 고점에서 10개봉이 지나도록 고점갱신이 없으면 그 고점에서 선을 바처럼 그어주고 지수를 표현해 주었으면 합니다. 반대로 저점에서도 같이 표현되었으면 합니다.
프로필 이미지
희망이당
2022-12-23
1209
글번호 164820
강조
답변완료

문의 드립니다

input : StartTime(220000),EndTime(40000); var : Tcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; IF Endtime <= starttime Then { SetStopEndofday(0); } } Inputs: VtyPercent(0.16),ATRperiod(50); If MarketPosition() <> 1 Then Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() == 1 Then Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() == -1 Then ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() == -1 Then Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() == 1 Then ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod))); ----------------------------- 1. 위 내용이 청산 가능한 수식어인지 궁금하네요. 절대값 abs함수를 넣으면 진입후 20틱내 청산금지의 수식어가 가능하다고 말씀하셨길래 자료를 찾아봐도 아래 내용 뿐입니다. 수정 편집이 가능한지 문의 드립니다. plot1(data2(abs(C))+data3(abs(c))); abs(K-Y) K와 Y가 가중이평선이시면 var : K(0),Y(0); K = wma(c,5); Y = wma(C,20); plot1(abs(K-Y)); 2. Inputs: VtyPercent(0.16),ATRperiod(50); 위 수식어의 해석이 "진입전 캔들 50봉의 상하단 16% 에서 진입신호"가 맞는지 문의 드립니다. 3. 위 첫번째 수식어는 진입신호의 방향성을 인지하기 위해 익절,손절을 넣지않았는데 손실 20틱일때 청산후 반대 포지션으로 진입하며 그 횟수는 55회로 한정하는 수식어를 부탁드립니다. 예전에 작성하신 수식어는 신호가 1회만 나오는듯해서 다시금 문의 드립니다. ----------------------------------- input : StartTime(210000),EndTime(60000); var : Tcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; IF Endtime <= starttime Then { SetStopEndofday(0); } } Inputs: VtyPercent(0.16),ATRperiod(50); If MarketPosition() <> 1 Then Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() == 1 Then Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() == -1 Then ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then Sell ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() == 1 Then ExitShort ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() == -1 Then Sell ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); 위수식어의 매매시간을 항생매매시간인 10시10분부터 당일 15시 30분까지로 변경을 부탁드립니다.
프로필 이미지
푸른
2022-12-26
1255
글번호 164816
시스템