커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

지표수정부탁드립니다

안녕하세요 항상 바쁘신중에도 빠른답변 감사합니다 아래수식 예스로 변환부탁 드립니다 1 valuewhen(1,date!=date(1)(h+l)/2) 2 if (npredayclose(1) > npredayopen(1), (npredayhigh(1)+npredaylow(1)+npredayclose(1)+npredayhigh(1))/4, if (npredayclose(1) < npredayopen(1), (npredayhigh(1)+npredaylow(1)+npredayclose(1)+npredaylow(1))/4, (npredayclose(1)+npredaylow(1)+npredayclose(1)+npredayclose(1))/4))) 수고하세요
프로필 이미지
몽창시리
2022-10-08
1146
글번호 162855
지표
답변완료

문의 드립니다

1. input : 익절틱수(160),손절틱수(100); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("ss",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("ss1",AtStop,EntryPrice+10); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); Sell("s2",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10); ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("sss",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("sss1",AtStop,EntryPrice+10); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*10); Sell("s8",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("bb",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bb1",AtStop,EntryPrice+10); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*10); Sell("s9",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("bbb",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bbb1",AtStop,EntryPrice+10); if NextBarSdate != sDate Then { if NextBarOpen == C Then { Buy("bsave",AtStop,NextBarOpen+PriceScale*10); Sell("ssave",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen == C Then { ExitLong("bsave1",AtStop,NextBarOpen-PriceScale*10); ExitShort("ssave1",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition == 1 Then Sell("ssave11",AtStop,EntryPrice-10); if MarketPosition == -1 Then Buy("bsave11",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ---------- 2. input : 익절틱수(180),손절틱수(100); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if sDate != sDate[1] Then { DD = DayOfWeek(Sdate); Year = Floor(Sdate/10000); V1 = (10000 * Year) + (100 * 3) + 1; V2 = 15 - dayofweek(v1); v3 = (10000 * Year) + (100 * 11) + 1; v4 = 8 - dayofweek(v3); Summer = Sdate > (10000 * Year) + (100 * 3) + v2 and Sdate < (10000 * Year) + (100 * 11) + v4; if summer == true Then { ST = 70000; ET = 55000; } Else { ST = 80000; ET = 65000; } } if Year > 0 Then { IF ET > ST Then SetStopEndofday(ET); Else { if sDate != sDate[1] Then SetStopEndofday(ET); } if ((NextBarSdate != sDate and NextBarStime >= ST) or (NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then { if NextBarOpen != c Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } } Else { if h < DayOpen+PriceScale*10 Then Buy("b1",AtStop,DayOpen+PriceScale*10); if l > DayOpen-PriceScale*10 Then Sell("s1",AtStop,DayOpen-PriceScale*10); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); -------------- 위 첨부파일 1번은 게시판 79099번의 3번째 올린 해외선물 일봉매매의 수식어입니다. 일봉매매에서 진입후 청산싯점이 부정확함에 분봉으로 작성을 문의한 바 2번으로 작성해 주셨고 그래프는 그 결과 입니다. 저가 생각한 수식어의 진입은 전일대비 당일시가의 전일비 상하 기준에따라 폭의 신호가 주어지는데 질의에대한 귀사에서 수정한 수식어에는 그러한 신호들이 아침7시 이후에 나오질않고 진입후 청산싯점은 한국시간으로 거의 AM 1시부터 3~4시전후 입니다. 위 수식어에 혹여 부분 수정이 가능한지 문의 드리고 아래의 수식어도 해외선물 분봉매매 로 변경 부탁드립니다. input : 익절틱수(300),손절틱수(100); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if sDate != sDate[1] Then { DD = DayOfWeek(Sdate); Year = Floor(Sdate/10000); V1 = (10000 * Year) + (100 * 3) + 1; V2 = 15 - dayofweek(v1); v3 = (10000 * Year) + (100 * 11) + 1; v4 = 8 - dayofweek(v3); Summer = Sdate > (10000 * Year) + (100 * 3) + v2 and Sdate < (10000 * Year) + (100 * 11) + v4; if summer == true Then { ST = 70000; ET = 55000; } Else { ST = 80000; ET = 65000; } } if Year > 0 Then { IF ET > ST Then SetStopEndofday(ET); Else { if sDate != sDate[1] Then SetStopEndofday(ET); } if ((NextBarSdate != sDate and NextBarStime >= ST) or (NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then { IF ET <= ST Then { SetStopEndofday(0); } if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { Sell ("bx",AtStop,NextBarOpen-PriceScale*10); Buy("sx",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); Sell("s1",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { Sell ("b1x",AtStop,NextBarOpen-PriceScale*10); Buy ("s1x",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); Sell("s2",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { Sell("b2x",AtStop,NextBarOpen-PriceScale*10); Buy("s2x",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b3",AtStop,NextBarOpen+PriceScale*10); Sell("s3",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { Sell("b3x",AtStop,NextBarOpen-PriceScale*10); Buy("s3x",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b4",AtStop,NextBarOpen+PriceScale*10); Sell("s4",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { Sell("b4x",AtStop,NextBarOpen-PriceScale*10); Buy("s4x",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b1y",AtStop,NextBarOpen+PriceScale*10); Sell("s1y",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { Sell("b1yy",AtStop,NextBarOpen-PriceScale*10); Buy("s1yy",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b2y",AtStop,NextBarOpen+PriceScale*10); Sell("s2y",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { Sell("b2yy",AtStop,NextBarOpen-PriceScale*10); Buy("s2yy",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b3y",AtStop,NextBarOpen+PriceScale*10); Sell("s3y",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { Sell("b3yy",AtStop,NextBarOpen-PriceScale*10); Buy ("s3yy",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen == C Then { Buy("bz",AtStop,NextBarOpen+PriceScale*10); Sell("sz",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen == C Then { Sell ("b1z",AtStop,NextBarOpen-PriceScale*10); Buy ("s1z",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen == C Then { Buy("b2z",AtStop,NextBarOpen+PriceScale*10); Sell("s2z",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen == C Then { Sell("b2zz",AtStop,NextBarOpen-PriceScale*10); Buy("s2zz",AtStop,NextBarOpen+PriceScale*10); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); } ----------------------------------- 아래는 참부파일2의 수식어 입니다. 해외선물 분봉 매매 수식어에서 7시 시가기준 진입신호에서 특정시간 ( 00 :00 )에 진입후 청산신호가 나타납니다. 체결내역의 파란사각형은 신호가 나오고 빨간사각형은 분봉차트에서 신호가 없네요. 또한 7시 장시작후 몇분내 당일청산신호(stopendofday)가 나옵니다. input : 익절틱수(160),손절틱수(100); var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False); var : ST(0),ET(0),entry(0); if sDate != sDate[1] Then { DD = DayOfWeek(Sdate); Year = Floor(Sdate/10000); V1 = (10000 * Year) + (100 * 3) + 1; V2 = 15 - dayofweek(v1); v3 = (10000 * Year) + (100 * 11) + 1; v4 = 8 - dayofweek(v3); Summer = Sdate > (10000 * Year) + (100 * 3) + v2 and Sdate < (10000 * Year) + (100 * 11) + v4; if summer == true Then { ST = 70000; ET = 55000; } Else { ST = 80000; ET = 65000; } } if Year > 0 Then { IF ET > ST Then SetStopEndofday(ET); Else { if sDate != sDate[1] Then SetStopEndofday(ET); } if ((NextBarSdate != sDate and NextBarStime >= ST) or (NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then { IF ET <= ST Then { SetStopEndofday(0); } if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { Sell ("bx",AtStop,NextBarOpen-PriceScale*10); Buy("sx",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); Sell("s1",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { Sell ("b1x",AtStop,NextBarOpen-PriceScale*10); Buy ("s1x",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); Sell("s2",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { Sell("b2x",AtStop,NextBarOpen-PriceScale*10); Buy("s2x",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b3",AtStop,NextBarOpen+PriceScale*10); Sell("s3",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { Sell("b3x",AtStop,NextBarOpen-PriceScale*10); Buy("s3x",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b4",AtStop,NextBarOpen+PriceScale*10); Sell("s4",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { Sell("b4x",AtStop,NextBarOpen-PriceScale*10); Buy("s4x",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b1y",AtStop,NextBarOpen+PriceScale*10); Sell("s1y",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { Sell("b1yy",AtStop,NextBarOpen-PriceScale*10); Buy("s1yy",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b2y",AtStop,NextBarOpen+PriceScale*10); Sell("s2y",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { Sell("b2yy",AtStop,NextBarOpen-PriceScale*10); Buy("s2yy",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b3y",AtStop,NextBarOpen+PriceScale*10); Sell("s3y",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { Sell("b3yy",AtStop,NextBarOpen-PriceScale*10); Buy ("s3yy",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen == C Then { Buy("bz",AtStop,NextBarOpen+PriceScale*10); Sell("sz",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen == C Then { Sell ("b1z",AtStop,NextBarOpen-PriceScale*10); Buy ("s1z",AtStop,NextBarOpen+PriceScale*10); } } if NextBarSdate != sDate Then { if NextBarOpen == C Then { Buy("b2z",AtStop,NextBarOpen+PriceScale*10); Sell("s2z",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen == C Then { Sell("b2zz",AtStop,NextBarOpen-PriceScale*10); Buy("s2zz",AtStop,NextBarOpen+PriceScale*10); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); }
프로필 이미지
푸른
2022-10-12
1140
글번호 162854
시스템
답변완료

시스템식 종목 검색식으로 부탁드립니다

AA=eavg(C, 125) >= eavg(C, 5) and eavg(C, 5) >= eavg(C, 20); //상승초입 CC=(97<=disparity(5)) and (disparity(5)<=103); DD=(97<=disparity(20)) and (disparity(20)<=103); EE=(97<=disparity(60)) and (disparity(60)<=103); //이평 압축 FF=C>C(1); //상승마감 GG=V>eavg(V(1), 5)*2; // 거래량 HH=O>=C; //음봉 AA and CC and DD and EE and FF and GG 종목검색 시스템식 매수 신호만 부탁드립니다
프로필 이미지
매치다는
2022-10-08
1342
글번호 162853
종목검색
답변완료

수식 수정좀 부탁합니다.

국선 전일 종가 기준 2포 이상 상승된 가격으로 당일 시초가격이 형성되면 시초가에서 바로 매도 진입하는 수식을 작성해보았는데 전일 종가 기준 2포 이상 상승 출발인데도 매도 진입이 안됩니다. 아래 수식 어디가 잘못된 것인지 수정좀 부탁합니다. if DayClose(1)+2 <= DayOpen and NextBarSdate != Sdate Then Sell("s",AtMarket);
프로필 이미지
천왕봉
2022-10-08
996
글번호 162852
시스템
답변완료

검색

항상감사합니다 1] 고가높이고,고가높이고 올라가던가던캔들이 앞(이전)고가 못가고 앞(이전)저가 깰때 이전(앞)캔들고가에 고가표시 해주십시요! 2] 저가깨고저가깨고 하락하던캔들이 앞저가안깨고 앞고가 높일때 앞(이전)저가에 저가표시 해주십시요!
프로필 이미지
호정0688
2022-10-08
1208
글번호 162850
검색

매치다는 님에 의해서 삭제되었습니다.

프로필 이미지
매치다는
2022-10-08
22
글번호 162849
종목검색
답변완료

추가 질문 드립니다

이 수식을 data2와 data3에서도 적용하고싶은데 가능한지 여쭈어봅니다. Input : Period1(600); var : DJ(0); var1 = ma(C,Period1); DJ = DateToJulian(CurrentDate)-2; IF DayOfWeek(CurrentDate) == 1 Then DJ = DJ-2; if sDate >= JulianToDate(DJ) Then plot1(var1,"이평"); ps: c 대신에 data2(c)를 넣어서 해보고 다른 수치를 바꿔보고 했는데 안되네요; 늘 감사하게 생각하고 있습니다.
프로필 이미지
새가날아오를때
2022-10-12
1103
글번호 162848
지표

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

프로필 이미지
회원
2022-10-08
47
글번호 162847
시스템
답변완료

시스템구현하는도움좀 구할게요(수정요청)

수식만들어주시느라 고생 많으셨어요~~ 근데 수식을 적용해봤는데 제가 생각했던 자리에서 진입 청산이 완전 틀려서 다시 요청드립니다. macd 골든, 데드크로스가 완성봉 기준이 아닌, 실시간 신호 나올때 적용이 된거 같습니다. 모든 신호는 완성봉 기준으로 다시 작성 부탁드리겠습니다!! > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 시스템구현하는도움좀 구할게요 > 안녕하세요 예스스탁입니다. input : short(6),long(12),sig(6); var : macdv(0),macds(0),t(0),s(0); macdv = macd(short,long); macds = ema(macdv,sig); if CrossUp(macdv,0) Then { t = 1; s = 0; } if CrossDown(macdv,0) Then { t = -1; s = 0; } s = s+1; if t == 1 and s == 2 Then Buy("b1"); if t == 1 and CrossUp(macdv,macds) Then Buy("b2"); if MarketPosition == 1 Then { if CrossDown(macdv,macds) Then ExitLong("bx1"); if CrossDown(macdv,0) Then ExitLong("bx2"); } if t == -1 and s == 2 Then Sell("s1"); if t == -1 and CrossDown(macdv,macds) Then Sell("s2"); if MarketPosition == -1 Then { if CrossUp(macdv,macds) Then ExitShort("sx1"); if CrossUp(macdv,0) Then ExitShort("sx2"); } SetStopLoss(PriceScale*50,PointStop); 즐거운 하루되세요 > 10년후에 님이 쓴 글입니다. > 제목 : 시스템구현하는도움좀 구할게요 > 안녕하세요 선생님들 참 고생 많다는고 잘알고있습니다. 시스템 구현하고 싶은게 있는데 꼭좀 부탁드리겠습니다. 예스트레이더로 자동매매를 구현해보려고 해요. 수식은 간단한데 도움주시면 감사하겠습니다. @ MACD 지표 지표조건 - short 6 / long 12 / signal / 6 위 값을 사용할거에요 @ 매수 진입조건 1. MACD 선이 기준선 0을 상향 크로스 한다음 강세 유지된 상태로 2번째 봉 종가에 시장가 매수주문 2. 기준선 0 위 강세일때 MACD 선과 SIGNAL 선 골든크로스 완성 봉에서 시장가 매수주문 @ 매수 청산 - 80틱 청산 or MACD 선과 SIGNAL 선 데드크로스 완성 봉 종가 시장가 청산 or MACD선이 기준선 0을 하향크로스 하여 약세로 전환된 첫번째 봉종가에 청산 @ 매도 진입조건 1. MACD 선이 기준선 0을 하향 크로스 한다음 약세 유지된 상태로 2번째 봉 종가에 시장가 매도주문 2. 기준선 0 아래 약세일때 MACD 선과 SIGNAL 선 데드크로스 완성 봉에서 시장가 매수주문 @ 매도 청산 - 80틱 청산 or MACD 선과 SIGNAL 선 골든크로스 완성 봉 종가 시장가 청산 or MACD선이 기준선 0을 상향크로스 하여 강세로 전환된 첫번째 봉종가에 청산
프로필 이미지
10년후에
2022-10-07
914
글번호 162846
시스템