커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
7668
글번호 230811
답변완료
4개의 ct전략입니다. yt로 바꾸어 주세요
안녕 하세요..
ct전략 바꾸어 주세요..^^
1번 전략
Input: s1(2.1), len1(56), len2(2.7)
If tdate<>Tdate(1) Then
Var1=lrs(close,len1,1)
Var2=Stdev(close,len1,s1,1)
' Var2=Stderr(close,len1,1)*S1 '표준오차 적용
Var10=1
Var3=var1*var10+opend
End If
If tdate=Tdate(1) Then
Var10=var10+1
Var3=var1*var10+openD
End If
Var4=var3+var2
Var5=var3-var2
Cond1= tdate=exitdate(1) And position(1)=1
Cond2= tdate=exitdate(1) And position(1)=-1
If ttime<1500 Then
If Cond1=False Then
Call buy("매수",Atstop,Def,Var4)
End If
If Cond2=False Then
Call sell("매도",Atstop,Def,Var5)
End If
End If
If position<>0 Then
Call exitlong("매수청산",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*len2)
Call exitshort("매도청산",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*len2)
End if
2번전략
Input: len1(200), ratio(0.382), s1(0.37), s2(2.7)
Var1=hhv(1,high,len1)-llv(1,low,len1)
Var2=var1*ratio
Var3=hhv(1,high,len1)-var2 ' high retracement
Var4=llv(1,low,len1)+var2 'low retracement
Cond1= tdate=exitdate(1) And position(1)=1
Cond2= tdate=exitdate(1) And position(1)=-1
If tdate<>tdate(1) Then
Var50=currententrynum
End If
If currententrynum-var50=0 Then
If ttime<1500 Then
Call buy("매수",Atstop,Def,opend+(highd(1)-lowd(1))*s1)
Call sell("매도",Atstop,Def,opend-(highd(1)-lowd(1))*s1)
If high<var3 And hhb(1,high,len1)<llb(1,low,len1) Then
Call buy("매수1",Atstop,Def,Var3)
End If
If low>var4 And hhb(1,high,len1)>llb(1,low,len1) Then
Call sell("매도1",Atstop,Def,Var4)
End If
End If
End If
If currententrynum-var50=1 Then
If ttime<1500 Then
If high<var3 And hhb(1,high,len1)<llb(1,low,len1) Then
If Cond1=False Then
Call buy("매수2",Atstop,Def,Var3)
End If
End If
If low>var4 And hhb(1,high,len1)>llb(1,low,len1) then
If Cond2=False Then
Call sell("매도2",Atstop,Def,Var4)
End If
End If
End If
End If
If position<>0 Then
Call exitlong("매수청산",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*s2)
Call exitshort("매도청산",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*s2)
End If
3번 전략
Input: perl(0.009), perh(0.017), s1(0.37), s2(2.7)
If high>=var31*(1+perL) And Var1(1)<>1 Then
Var1=1
Var3=high
End If
If low<=var3*(1-perh) And Var1(1)<>-1 Then
Var1=-1
Var31=low
End If
If low<var31 Then
Var31=low
End If
If high>var3 Then
Var3=high
End If
If tdate<>Tdate(1) Then
Var50=currententrynum
End If
If currententrynum-var50=0 Then
If ttime<1500 Then
If Var1=-1 And high<var31*(1+perL) Then
Call buy("매수",Atstop,Def, Var31*(1+perL))
Call sell("매도1",Atstop,Def,opend-(highd(1)-lowd(1))*S1)
End If
If Var1=1 And low>var3*(1-perh) Then
Call sell("매도",Atstop,Def, Var3*(1-perh))
Call buy("매수1",Atstop,Def,opend+(highd(1)-lowd(1))*S1)
End If
End If
End If
If position<>0 Then
Call exitlong("매수추적",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*S2)
Call exitshort("매도추적",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*S2)
End If
4번전략
Input: perl(4.9), perh(10), len1(100), s1(0.37), s2(2.7)
Var20=high-low
Var21=mov(Var20,len1,S)
If high>=var31+var21*Perl And Var1(1)<>1 Then
Var1=1
Var3=high
End If
If low<=var3-var21*Perh And Var1(1)<>-1 Then
Var1=-1
Var31=low
End If
If low<var31 Then
Var31=low
End If
If high>var3 Then
Var3=high
End If
If tdate<>Tdate(1) Then
Var50=currententrynum
End If
If currententrynum-var50=0 Then
If ttime<1500 Then
If Var1=-1 And high<var31+var21*Perl Then
Call buy("매수",Atstop,Def, Var31+var21*Perl)
Call sell("매도1",Atstop,Def,opend-(highd(1)-lowd(1))*S1)
End If
If Var1=1 And low>var3-var21*Perh Then
Call sell("매도",Atstop,Def, Var3-var21*Perh)
Call buy("매수1",Atstop,Def,opend+(highd(1)-lowd(1))*S1)
End If
End If
End If
If currententrynum-var50=1 Then
If ttime<1500 Then
If Var1=-1 And high<var31+var21*Perl Then
Call buy("매수2",Atstop,Def, Var31+var21*Perl)
End If
If Var1=1 And low>var3-var21*Perh Then
Call sell("매도2",Atstop,Def, Var3-var21*Perh)
End If
End If
End If
If position<>0 Then
Call exitlong("매수추적",Atstop,hhv(1,high,barnumsinceentry+1)-atr(20)*S2)
Call exitshort("매도추적",Atstop,llv(1,low,barnumsinceentry+1)+atr(20)*S2)
End If
부탁 드립니다.
2012-04-02
391
글번호 49632
답변완료
언제나 감사합니다.
5개봉 중에 고점봉의 저점을 깨는 할때 Plot
5개 봉 중에 저점봉의 고점을 돌파하는 할때 Plot
하는 지표식 부탁드립니다..
항상 감사합니다.
2012-04-02
297
글번호 49629
답변완료
시스템식 문의드립니다.
안녕하세요
시스템식 문의드립니다.
질의] 아래와같은 조건식에서 추가로 Condition1과 Condition2, Condition3 안에 공통
으로 과거 5일에서 20일사이의 종가가 20일 최저가일때 buy금지 조건을 붙일려고 합니다.
Condition1 = ma(C,3) > ma(C,5) and ma(C,5) > ma(C,7) and ma(C,7) > ma(C,9);
Condition2 = C > highest(c,12)[1] And o < var2 and c > var2 and
!(c[6]<lowest(c,20)[7] and v>highest(v,20)[1]);
Condition3 = ma(C,5) > ma(C,10) and ma(C,20);
if Condition1 or Condition2 or Condition3 Then buy();
Condition4 = c - o < -0.60;
Condition5 = CrossDown(C,ma(C,20)) and c - o < -0.15;
if Condition4 or Condition5 Then ExitLong();
감사합니다.
2012-04-02
286
글번호 49625
답변완료
수정해주세요----------------
temcvcha = (3 * Ema(cvcha,LENGTH9)) - (3 * Ema(Ema(cvcha,LENGTH9),LENGTH9)) +
(Ema(Ema(Ema(cvcha,LENGTH9),LENGTH9),LENGTH9));
if highest(H,80)-lowest(L,80) >= C*0.0025 then {
if countif (c >= c[5] and cvcha <cvcha[5]-50,3) >=2 and cvcha > -2500 or
countif (c >= c[5] and cvcha <cvcha[5]-150,1) >=1 and cvcha > -2500 or
cvcha [2] + 급변 < cvcha[1] and cvcha[1] - 급변 > cvcha then{
sell("s");
}
위 조건에해당되어 매도 신호 나올때 "temcvcha "가 2봉중 2봉이상승중이면 매도하지말고 기다렸다가 "temcvcha "가 하락할때 매도하게고처주세요
if countif (c <= c[5] and cvcha >cvcha[5]+50,3) >=2 and cvcha < -5000 or
countif (c <= c[5] and cvcha >cvcha[5]+150,1) >=1 and cvcha < -5000 or
cvcha [2] - 급변 > cvcha[1] and cvcha[1] + 급변 < cvcha then{
buy("b");
위 조건에해당되어 매수 신호 나올때 "temcvcha "가 2봉중 2봉이하락중이면 매수하지말고 기다렸다가 "temcvcha "가 상승할때 매수하게고처주세요
청산(매수매도 공통)
3틱미만 수익났으면 진입가-4틱에 청산
3틱이상 수익났으면 진입가-2틱에 청산
5틱이상 수익났으면 진입가에 청산
15틱이상 수익났으면 진입가+10틱에 청산
부탁드립니다----
2012-04-02
312
글번호 49622
답변완료
시스템식 질문입니다
1,2틱 차트에서
박스형 돌파 시스템을 만들고 싶습니다.
봉갯수가 아니라
10초 동안 또는 N초 동안의 최고점 돌파시 매수 입니다
2012-04-02
325
글번호 49621
답변완료
문의드립니다.
안녕하세요.
if ma(c,5) > ma(c,20) &&
c<ma(c,5)*1.03 && c>ma(c,5)*0.99 ( 5일이평 값의 -1% ~ 3% 사이에 있는 종목을 검색)
인 조건의 종목을 검색하라는 식에서
검색된 종목을 나열할 때
5일이평에서 낮은 값 즉 -1% 인 종목부터 나열하여 높은 값 3%까지 순서대로 나열하라는 식이 되는지 알고 싶습니다.
수고하세요.
2012-04-02
316
글번호 49620
답변완료
ct인데요.. 예스로 바꿔 주세요
안녕 하세요
Input: len1(11), s1(0.36), s2(2.7)
Set hvalue=Arrays(10,2)
Set lvalue=Arrays(10,2)
If shba(1,high,len1,len1)=len1 Then
Var1=999999
For i = 9 To 1 Step - 1
hvalue(i,0)=hvalue(i-1,0)
hvalue(i,1)=hvalue(i-1,1)
Next
hvalue(0,0)=shva(1,high,len1,len1)
hvalue(0,1)=barnum
For j = 1 To 9
If hvalue(j,0)>hvalue(0,0) Then
Var1=j
j=11
End If
Next
End If
If Var1<=10 Then
Var10=(hvalue(0,0)-hvalue(Var1,0))/(hvalue(0,1)-hvalue(Var1,1)) _
* shba(1,high,len1,len1)+hvalue(0,0)
Else
Var10=999999
End If
If slba(1,low,len1,len1)=len1 Then
Var2=999999
For i = 9 To 1 Step - 1
lvalue(i,0)=lvalue(i-1,0)
lvalue(i,1)=lvalue(i-1,1)
Next
lvalue(0,0)=slva(1,low,len1,len1)
lvalue(0,1)=barnum
For j = 1 To 9
If lvalue(j,0)<lvalue(0,0) Then
Var2=j
j=11
End If
Next
End If
If Var2<=10 Then
Var11=(lvalue(0,0)-lvalue(Var2,0))/(lvalue(0,1)-lvalue(Var2,1)) _
* slba(1,low,len1,len1)+lvalue(0,0)
Else
Var11=99999
End If
If tdate<>tdate(1) Then
Var50=currententrynum
End If
If currententrynum-var50 = 0 Then
2012-04-02
300
글번호 49618
누리맨 님에 의해서 삭제되었습니다.
2012-04-02
1
글번호 49616
답변완료
수식문의 드립니다.
> 분봉에서 사용하려고 하는데 ADX(14)의 일봉(아침)시가값을 표현하는 지표식이나 수식 부탁드립니다. 감사합니다.
2012-04-02
314
글번호 49615