커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

74235 다시 문의드립니다

아침 9시 장시작전에 수치가 나오지 않고 예전처럼 장시작해야 수치가 보입니다 다시 검토해주시면 감사하겠습니다
프로필 이미지
러블리
2021-10-08
817
글번호 152758
지표
답변완료

수식 의뢰드립니다!

안녕하세요! 매매에 도움을 받고싶어 수식 의뢰드려요! 이해를 돕고져 이미지를 첨부합니다! 예) 20선 이평선을 적용하면다면 현재봉 기준 뒤로 21번째 봉의 종가선을 우측으로 연장해서 표시되는 수식을 의뢰드립니다! 현재봉이 완성되고 새로운 봉이 생성되면 21번째 종가선은 앞 직전봉으로 자동으로 당겨지게 해주세요! 이평 주기나 색상, 굵기는 외부변수로 나타나게 해주세요! 항상 노고에 감사드립니다!
프로필 이미지
qha71
2021-10-08
1134
글번호 152757
지표
답변완료

시스템 작성의뢰

수고 하십니다 ! input : Period1(13),Period2(25),Period3(2),Length1(26),Length2(50),Length3(2); var : StMomentum1(0),StMomentum2(0); StMomentum1 = SMI(Period1,Period2,Period3); StMomentum2 = SMI(Length1,Length2,Length3); plot1(StMomentum1); plot2(StMomentum2); PlotBaseLine1(40,"과열"); PlotBaseLine2(-40,"침체"); 위 지표에서 crossup (plot1,plot2) 이면 매수를 , crossdown (plot1,plot2) 이면 매도를 체결하는 수식작성을 부탁 드립니다 . *** 수고 하세요 ***
프로필 이미지
tnsflwls
2021-10-08
937
글번호 152756
시스템
답변완료

문의드립니다

코인에서쓰고잇구요 아래수식중에 매도조건하나더추가하고싶은데요 현제는 엔벨로프중앙선상향돌파시전체매도1가지로되잇는데 여기에평단5프로이상전체매도추가하고싶은데요 중앙선상향돌파시전체매도 평단5프로상승시전체매도 둘중에먼저도달하는걸로매도되게부탁드립니다 Input : Period(20), Percent(3); input : M1(30000),M2(30000),M3(60000),M4(120000),M5(240000),M6(480000),M7(960000),M8(1920000),M9(3840000),M10(7680000); var : center(0),UPline(0),DNline(0); center = ma(C, Period); UPline = EnvelopeUp(Period, Percent); Dnline = EnvelopeDown(Period, Percent); if MarketPosition == 0 and CrossDown(C,DnLine) Then Buy("b1",OnClose,DEF,M1/C); if MarketPosition == 1 Then { if CurrentEntries == 1 Then Buy("b2",AtLimit,AvgEntryPrice*0.98,M2/min(nextbaropen,AvgEntryPrice*0.98)); if CurrentEntries == 2 Then Buy("b3",AtLimit,AvgEntryPrice*0.95,M3/min(nextbaropen,AvgEntryPrice*0.95)); if CurrentEntries == 3 Then Buy("b4",AtLimit,AvgEntryPrice*0.90,M4/min(nextbaropen,AvgEntryPrice*0.90)); if CurrentEntries == 4 Then Buy("b5",AtLimit,AvgEntryPrice*0.85,M5/min(nextbaropen,AvgEntryPrice*0.85)); if CurrentEntries == 5 Then Buy("b6",AtLimit,AvgEntryPrice*0.80,M6/min(nextbaropen,AvgEntryPrice*0.80)); if CurrentEntries == 6 Then Buy("b7",AtLimit,AvgEntryPrice*0.75,M7/min(nextbaropen,AvgEntryPrice*0.75)); if CurrentEntries == 7 Then Buy("b8",AtLimit,AvgEntryPrice*0.70,M8/min(nextbaropen,AvgEntryPrice*0.70)); if CurrentEntries == 8 Then Buy("b9",AtLimit,AvgEntryPrice*0.65,M9/min(nextbaropen,AvgEntryPrice*0.65)); if CurrentEntries == 9 Then Buy("b10",AtLimit,AvgEntryPrice*0.60,M10/min(nextbaropen,AvgEntryPrice*0.60)); if CrossUp(c,center) Then <<<<<<<<<<< 요부분요^^ ExitLong("bx"); if CurrentContracts > CurrentContracts[1] Then { if LatestEntryName(0) == "b4" Then Var4 = LatestEntryPrice(0); if LatestEntryName(0) == "b5" Then Var5 = LatestEntryPrice(0); if LatestEntryName(0) == "b6" Then Var6 = LatestEntryPrice(0); if LatestEntryName(0) == "b7" Then Var7 = LatestEntryPrice(0); if LatestEntryName(0) == "b8" Then Var8 = LatestEntryPrice(0); if LatestEntryName(0) == "b9" Then Var9 = LatestEntryPrice(0); if LatestEntryName(0) == "b10" Then Var10 = LatestEntryPrice(0); } if CurrentContracts < CurrentContracts[1] Then { if LatestExitName(0) == "bx4" Then Var4 = 0; if LatestExitName(0) == "bx5" Then Var5 = 0; if LatestExitName(0) == "bx6" Then Var6 = 0; if LatestExitName(0) == "bx7" Then Var7 = 0; if LatestExitName(0) == "bx8" Then Var8 = 0; if LatestExitName(0) == "bx9" Then Var9 = 0; if LatestExitName(0) == "bx10" Then Var10 = 0; } if var4 > 0 Then ExitLong("bx4",AtLimit,Var4*1.05,"b4"); if var5 > 0 Then ExitLong("bx5",AtLimit,Var5*1.05,"b5"); if var6 > 0 Then ExitLong("bx6",AtLimit,Var6*1.05,"b6"); if var7 > 0 Then ExitLong("bx7",AtLimit,Var7*1.05,"b7"); if var8 > 0 Then ExitLong("bx8",AtLimit,Var8*1.05,"b8"); if var9 > 0 Then ExitLong("bx9",AtLimit,Var9*1.05,"b9"); if var10 > 0 Then ExitLong("bx10",AtLimit,Var10*1.05,"b10"); } Else { var4 = 0; var5 = 0; var6 = 0; var7 = 0; var8 = 0; var9 = 0; var10 = 0; }
프로필 이미지
백억이
2021-10-07
1182
글번호 152755
시스템
답변완료

엑셀로 데이터 출력(print)

안녕하세요. 아래와같이 데이터를 엑셀로 보내려고 하는데, 내부변수를 인식하지 못하는것같네요 콘탱고BS평균, 백워데이션BS평균 이 두 내부변수가 엑셀에는 공란으로 나오고 있습니다. 내부변수에 값이 잘 들어가서 찍히는것 까지는 차트에서 확인했는데, 여기서는 출력이 되지 않는데 혹시 방법 있을까요? // 1) 주식 종가 , 2) 선물 종가 , 3) 베이시스(주식현재가-선물현재가), 4) 콘탱고BS평균, 5) 백워데이션BS평균 Var : cnt(0); var : 콘탱고BS합(0), 콘탱고BS갯수(0), 콘탱고BS평균(0); var : 백워데이션BS합(0), 백워데이션BS갯수(0), 백워데이션BS평균(0); var : Basis(0); Input : 기간(3); 콘탱고BS합 = 0; 콘탱고BS평균 = 0; 콘탱고BS갯수 = 0; 백워데이션BS합 = 0; 백워데이션BS평균 = 0; 백워데이션BS갯수 = 0; Basis = data2(C)-C; For cnt = 0 to 기간-1 //설정 기간동안 for문 돌림 (input에 3입력하면 0부터 포문이 돌기때문에 4가 됨. 그래서 -1해줌) { if Basis[cnt] > 0 Then // 베이시스가 0 초과면 (콘탱고가 나오면) { 콘탱고BS합 = 콘탱고BS합 + basis[cnt]; // 기간 내 콘탱고 수치를 누적해줌 콘탱고BS갯수 = 콘탱고BS갯수 +1; // 기간 내 콘탱고 횟수 카운트 콘탱고BS평균 = 콘탱고BS합/콘탱고BS갯수; // 기간 내 콘탱고 평균 } Else { 백워데이션BS합 = 백워데이션BS합 + basis[cnt]; // 기간 내 백워데이션 수치를 누적해줌 백워데이션BS갯수 = 백워데이션BS갯수 +1; // 기간 내 백워데이션 횟수 카운트 백워데이션BS평균 = 백워데이션BS합/백워데이션BS갯수; // 기간 내 백워데이션 평균 } } Print("C:₩Data_BasisAVG.csv",",%.f,%.f,%.f,%.f,%.f",Close,data2(C),(data2(C)-C),콘탱고BS평균, 백워데이션BS평균);
프로필 이미지
퀀트드래곤
2021-10-07
744
글번호 152754
지표
답변완료

함수문의

안녕하세요? 아래 글번호 74226번에 답변 주신 스크립트 가운데 if T == 2 and MarketPosition == 1 Then T = 3; if T == -2 and MarketPosition == -1 Then T = -3; 가 갖는 의미가 무엇인가요? 상기의 스크립트를 포함했을 때와 제외했을 때의 신호 생성에 차이가 발생되는지요? 신호생성에 T = 3과 T = -3이 어떻게 적용되는지요?
프로필 이미지
흰둥이아빠
2021-10-07
1034
글번호 152752
시스템
답변완료

문의 드립니다

0. 진입한 봉의 저점, 고점을 표현하는 수식이 H[BarsinceEntry(1)], L[BarsinceEntry(1)] 이 맞나요? 0. 그리고 바로 앞봉의 고가, 저가를 표현하는 수식은 어떻게 되는지... 0. 앞봉의 고가보다 높고, 앞봉의 저가보다 낮다는 수식은 어떻게되는지요...
프로필 이미지
knp116
2021-10-07
1325
글번호 152751
시스템
답변완료

문의 드립니다.

1. 항셍(오전 10시 18분 ~ 오전 11시 40분), 나스닥(22시 30분 ~ 01시 10분) 골드(21시 ~22시 10분) 거래시간 지정 2. 매도신호가 나오는 캔들의 종가에 매도. 음봉일 때만 매도(양봉일 때는 안함) 3. 매수신호가 나오는 캔들의 종가에 매수. 양봉일 때만 매수(음봉일 때는 안함) 4. 매수와 매도, 모두1계약을 진입합니다. 항셍 10시 18분 ~ 10시 30분까지는 익절 30틱, 손절 30틱 / 10시 30분 ~ 11시 40분까지는 익절 50틱, 손절 30틱. 나스닥은 오후 22시 30분 ~ 01시 10분까지 익절 50틱, 손절 30틱 골드는 오후 21시 ~ 22시 10분까지 익절 20틱, 손절 15틱 5. 거래시간 종료시에 포지션이 있을 경우 수식에 따라 익절 또는 손절 종료함. 6. 익절 3회 연속, 또는 손절 3회 연속이면 당일 거래 종료. 아래에 수식은 일전에 문의한 것에 대해 답을 해주신 것입니다. 위 내용에 대한 수식으로의 변경을 할 경우, 추가나 수정해야 할 부분이 헷갈려서요. 답변 부탁드립니다. 늘 친절히 답변해주심에 감사드립니다. input : StartTime(101500),EndTime(120000); input : Length(20), D1(2); var : Tcond(false); 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; var1 = BollBandUp(Length,D1); var2 = BollBandDown(Length,D1); if Tcond == true Then { If CrossUP(H,var1) and c > o then Buy("b",OnClose,DEF,2); If CrossDown(L,Var2) and C < O then Sell("s",OnClose,DEF,2); } if MarketPosition == 1 Then { ExitLong("Bp1",AtLimit,EntryPrice+PriceScale*50,"",1,1); ExitLong("Bp2",AtLimit,EntryPrice+PriceScale*100,"",1,1); ExitLong("Bl",AtStop,EntryPrice-PriceScale*3,"",1,1); if CurrentContracts < MaxContracts and Highest(H,BarsSinceEntry) > EntryPrice+PriceScale*50 Then ExitLong("btr",AtStop,EntryPrice+PriceScale*10); } if MarketPosition == -1 Then { ExitShort("sp1",AtLimit,EntryPrice-PriceScale*50,"",1,1); ExitShort("sp2",AtLimit,EntryPrice-PriceScale*100,"",1,1); ExitShort("sl",AtStop,EntryPrice+PriceScale*3,"",1,1); if CurrentContracts < MaxContracts and lowest(L,BarsSinceEntry) < EntryPrice-PriceScale*50 Then ExitShort("str",AtStop,EntryPrice+PriceScale*10); } IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { IF Endtime <= starttime Then { SetStopEndofday(0); } } 2 24시는 0시 입니다. input : StartTime(223000),EndTime(0); input : Length(20), D1(2); var : Tcond(false); 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; var1 = BollBandUp(Length,D1); var2 = BollBandDown(Length,D1); if Tcond == true Then { If CrossUP(H,var1) and c > o then Buy("b",OnClose,DEF,2); If CrossDown(L,Var2) and C < O then Sell("s",OnClose,DEF,2); } if MarketPosition == 1 Then { ExitLong("Bp1",AtLimit,EntryPrice+PriceScale*50,"",1,1); ExitLong("Bp2",AtLimit,EntryPrice+PriceScale*100,"",1,1); ExitLong("Bl",AtStop,EntryPrice-PriceScale*3,"",1,1); if CurrentContracts < MaxContracts and Highest(H,BarsSinceEntry) > EntryPrice+PriceScale*50 Then ExitLong("btr",AtStop,EntryPrice+PriceScale*10); } if MarketPosition == -1 Then { ExitShort("sp1",AtLimit,EntryPrice-PriceScale*50,"",1,1); ExitShort("sp2",AtLimit,EntryPrice-PriceScale*100,"",1,1); ExitShort("sl",AtStop,EntryPrice+PriceScale*3,"",1,1); if CurrentContracts < MaxContracts and lowest(L,BarsSinceEntry) < EntryPrice-PriceScale*50 Then ExitShort("str",AtStop,EntryPrice+PriceScale*10); } IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { IF Endtime <= starttime Then { SetStopEndofday(0); } }
프로필 이미지
회원
2021-10-07
1284
글번호 152745
시스템
답변완료

문의

input : Period1(10),Period2(20); var : Hval1(0),Lval1(0),UPV1(0),MID1(0),DOWNV1(0); var : Hval2(0),Lval2(0),UPV2(0),MID2(0),DOWNV2(0); Hval1 = highest(H,Period1); Lval1 = Lowest(L,Period1); UPV1 = Hval1 - (Hval1-Lval1)/3; MID1 = Lval1 + (Hval1-Lval1)/2; DOWNV1 = Lval1 + (Hval1-Lval1)/3; Hval2 = highest(H,Period2); Lval2 = Lowest(L,Period2); UPV2 = Hval2 - (Hval2-Lval2)/3; MID2 = Lval2 + (Hval2-Lval2)/2; DOWNV2 = Lval2 + (Hval2-Lval2)/3; plot1(MID1,"중간선1"); plot2(MID2,"중간선2"); 위 지료식 에서 중간선2가 중간선1을 상향돌파하는 종목검색식 부탁합니다
프로필 이미지
상큼한아침
2021-10-07
986
글번호 152737
종목검색