커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

문의드립니다.

수고많으십니다. 아래 수식은 검증은 이상없다고 하는데, 데모 데이타가 전혀 안나옵니다. 어떤 문제가 있는 건가요? input : n1(5), n(10); input : StartTime(210000),EndTime(053000); input : 익절틱수(80),손절틱수(0),거래횟수(10); input : mm(50),m1(10); var : Tcond(false), T(0), entry(0); Array : H1[50](0),L1[50](0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { T = 0; Tcond = true; entry = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if Tcond == true Then { if H > Highest(H,n1)[1] and C > O and entry < 거래횟수 Then Buy("b"); if L < Lowest(L,N1)[1] and C < O and entry < 거래횟수 Then Sell("s"); if MarketPosition == 1 Then ExitLong("bx",AtStop,Lowest(L,n)[BarsSinceEntry]-PriceScale*1); if MarketPosition == -1 Then ExitShort("sx",AtStop,Highest(H,n)[BarsSinceEntry]+PriceScale*1); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if MarketPosition == 1 Then { if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*mm Then ExitLong("btr",AtStop,EntryPrice+PriceScale*m1); } if MarketPosition == -1 Then { if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*mm Then ExitShort("str",AtStop,EntryPrice-PriceScale*m1); } 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); } }
프로필 이미지
jesten77
2021-11-25
1109
글번호 153941
시스템
답변완료

문의 드립니다.~~~~

감사하게 많이 배우고 있습니다~~ 아래식을 실행해보면 ntime(100000)으로 정해진 10시 시간내에서만 진입과 청산이 이루어 집니다. 진입조건이 성립된다면 해외선물 거래 시간인 8시에서 다음날 6시까지 연속해서 거래가 되었으면 합니다. 어떻게 시간 설정을 해야 하나요? input : ntime(100000),nn(10),mm(20),aa(10),bb(20); input : 익절틱수(10),손절틱수(10); var : OO(0),HH(0),LL(0),HL(0),LH(0); if (sdate != sdate[1] and stime >= ntime) or (sdate == sdate[1] and stime >= ntime and stime[1] < ntime) Then { OO = O; HH = H; HL = HH; LL = L; LH = LL; Condition1 = False; Condition1 = False; } Else { #거래횟수 증가(청산이 되서서 거래완료) if TotalTrades > TotalTrades[1] Then { OO = O; HH = H; HL = HH; LL = L; LH = LL; Condition1 = False; Condition1 = False; } if HH > 0 and LL > 0 Then { if H > HH Then { HH = H; HL = HH; } Else { if L < HL Then HL = L; } if L < LL Then { LL = L; LH = LL; } Else { if H > LH Then LH = H; } if HL < HH-PriceScale*nn Then Condition1 = true; if LH > LL+PriceScale*aa Then Condition2 = true; if Condition1 == False and HH < LL+PriceScale*mm Then Sell("s",AtLimit,LL+PriceScale*mm); if Condition2 == False and LL < HH-PriceScale*bb Then Buy("b",AtLimit,HH-PriceScale*bb); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
프로필 이미지
예스요
2021-11-25
974
글번호 153940
시스템
답변완료

수정부탁드립니다

#74801 답변수식 적용해서 기간을 적용하니 16일 미만은 선이 전혀 나타나지 않습니다,점검부탁드립니다.
프로필 이미지
크라켄
2021-11-25
867
글번호 153937
지표
답변완료

문의 드립니다.

친절한 도움에 감사드립니다. 수식에 IF Endtime > starttime Then 이 부분에 에러가 난다고 합니다. 다른 부분도 혹시 잘못된 부분 있으면 수정 부탁드립니다. 감사합니다. input : n1(n),n(n); input : StartTime(231000),EndTime(053000); input : 익절틱수1(80),익절틱수2(100),손절틱수(50), 익절횟수(1); input : mm(50),m1(10); var : Tcond(false), T(0), Profit(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { T = 0; Tcond = true; Profit = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if TotalTrades > TotalTrades[1] and IsExitName("StopProfitTarget",1) == true Then Profit = profit+1; if Tcond == true Then { if MarketPosition <= 0 and NextBarOpen <= Highest(H,n1) and Profit < 익절횟수 Then Buy("b1",AtStop,Highest(H,n1)+PriceScale*1); if MarketPosition >= 0 and NextBarOpen >= Lowest(L,N1) and Profit < 익절횟수 Then Sell("s1",AtStop,Lowest(L,N1)-PriceScale*1); } SetStopLoss(PriceScale*손절틱수,PointStop); if MarketPosition == 1 Then { ExitLong("Bp1",AtLimit,EntryPrice+PriceScale*익절틱수1,"",max(1,Floor(MaxContracts/2)),1); ExitLong("Bp2",AtLimit,EntryPrice+PriceScale*익절틱수2); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*mm Then ExitLong("btr",AtStop,EntryPrice+PriceScale*m1); } if MarketPosition == -1 Then { ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절틱수1,"",max(1,Floor(MaxContracts/2)),1); ExitShort("sp2",AtLimit,EntryPrice-PriceScale*익절틱수2); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*mm Then ExitShort("str",AtStop,EntryPrice-PriceScale*m1); } 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); } }
프로필 이미지
jesten77
2021-11-25
1323
글번호 153933
시스템
답변완료

함수요청

안녕하세요? 국내연결선물 일봉상 최근 100개봉사이에서 음봉과 양봉의 갯수를 카운트하고 싶습니다. 직전전봉의 macd 오실레이터와 직전봉의 macd 오실레이터 값을 비교하여 값이 증가할 때 당일 캔들의 양봉과 음봉의 갯수 직전전봉의 macd 오실레이터와 직전봉의 macd 오실레이터 값을 비교하여 값이 감소할 때 당일 캔들의 양봉과 음봉의 갯수 를 각각 카운팅하고 싶습니다. 예스랭귀지로 가능하다면 부탁드립니다.
프로필 이미지
흰둥이아빠
2021-11-25
947
글번호 153932
사용자 함수
답변완료

문의 드립니다.~~~~

74798 재문의 답 주시면 감사하겠습니다~~
프로필 이미지
예스요
2021-11-25
1003
글번호 153929
시스템
답변완료

시스템

안녕하세요 아래식을 최대한 자세히 설명 부탁드립니다 input : P1(5),p2(20); var : mav1(0),mav2(0),mav3(0),diff(0),sum(0); mav1 = ma(c,P1); mav2 = ma(c,P2); diff = mav2-mav2[1]; sum = AccumN(diff,10); if sum >= PriceScale*10 and crossup(c,mav1) Then buy("b"); 감사합니다 수고하세요
프로필 이미지
달마7
2021-11-25
1343
글번호 153922
시스템
답변완료

부탁드립니다

매수는 양봉이면서 종가가 5이평 위에서 끝나면 매수신호 매도는 음봉이면서 종가가 5이평 아래에서 끝나면 매도신호 부탁합니다.
프로필 이미지
묵연히
2021-11-25
1170
글번호 153920
시스템
답변완료

지표

선 &#8211;이름과 가격표시 표현 수식이 어렵습니다. Input : 기준1(290), 이격1(2.5), 이격2(1.25), AA1(5); var: tx1(0),tx2(0),tx3(0),tx4(0),tx5(0),tx6(0), Text_Delete(tx1); Text_Delete(tx2); Text_Delete(tx3); tx1 = var1; tx2 = var2; tx3 = var3; Text_SetStyle(tx1,0,1); Text_SetStyle(tx2,0,1); Text_SetStyle(tx3,0,1); #텍스트색 Text_SetColor(tx1,MAGENTA); Text_SetColor(tx2,RED); Text_SetColor(tx3,BLUE); #텍스트크기 Text_SetSize(tx1,10); Text_SetSize(tx2,10); Text_SetSize(tx3,10); var3 = 기준1; var1=0; if var1 <= AA1 Then { plotbaseline1(Var3,"1:",GRAY,2); plotbaseline2(Var3-이격2,"2",LGREEN,2); var1 = var1 +1 ; } if var1 <= AA1 Then { plotbaseline3(Var3-(이격1*1),"3",GRAY); plotbaseline4(Var3-(이격1*1)-이격2,"4",LGREEN); var1 = var1 +1 ; } if var1 <= AA1 Then { plotbaseline5(Var3-(이격1*2),"5"); plotbaseline6(Var3-(이격1*2)-이격2,"6"); var1 = var1 +1 ; }
프로필 이미지
호정0688
2021-11-25
772
글번호 153912
지표