커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

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

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

수정 부탁드립니다

아래 두 지표수식에서 이평선과 색상 변화를 기준으로한 매매를 하길 원합니다. 자세한 내용은 그림을 참조해주세요 1) input : p(40); var1=ma(c,p); if var1>var1[1] Then plot1(var1,"40ma색깔선",RED); Else plot1(var1,"40ma색깔선",BLUE); ----------------------------------------------- 2) Input : short(15), long(30), sig(2); Var : macdo(0); macdo = MACD_OSC(short,long,sig); if macdo > 0.03 Then PlotPaintBar(H,L,"강조",RED); if macdo > 0 and macdo <= 0.03 Then PlotPaintBar(H,L,"강조",MAGENTA); if macdo <= 0 and macdo >= -0.03 Then PlotPaintBar(H,L,"강조",CYAN); if macdo <= -0.03 Then PlotPaintBar(H,L,"강조",blue);
프로필 이미지
매일상승
2015-07-08
143
글번호 88139
시스템
답변완료

수식 수정좀 부탁드립니다

input:len(19); var:AA(0),wcl(0),b(0),avgTR(0),newvar1(0),volratio(0),const(0),buypr(0),sp(0), bpp(0),NEWVAR2(0),WTCRATIO(0),SELLPR(0),MABP(0),BUYPRES(0),MASP(0),SELLPRES(0), FORMAT(0),DIVEND(0),TEMPDI(0),MYDMI(0),divsor(0); AA =(H+L+2*C); wCl =(H+L+C+C)/4; B =Average((highest(H,2)-lowest(L,2)),len); AvgTR =Average(highest(H,2)-lowest(L,2),len); newVar1 =V/Average(V,len); VolRatio =V/Average(V,len); newVar2 =(AA+Ref(AA,-1))/B; WtCRatio =(wCl-Ref(wCl,-1)) / Min(wCl,Ref(wCl,-1)); Const =VolRatio/(Exp((wCl*3)/AvgTR)*Abs(WtCRatio)); BPP =If(AA>=Ref(AA,-1),newVar1,1/Exp((newVar2)*(Ref(AA,-1)-AA)/AA)); BuyPr:=If(WtCRatio>=0,VolRatio,Const); SP =If(AA<=Ref(AA,-1),newVar1,1/Exp((newVar2)*(AA-Ref(AA,-1))/Ref(AA,-1))); SellPr =If(WtCRatio<=0,VolRatio,Const); mabp =Average(BPp,len); BuyPres =Average(BuyPr,len); masp =Average(SP,len); SellPres =Average(SellPr,len); divsor=If(mabp>masp,mabp,masp); divend=If(mabp<masp,mabp,masp); var2=1-(divend/divsor); var3=If((masp>mabp),-var2,var2) ; var4=var3*100; var4; Sign=If(SellPres>BuyPres,-1,1); TempDI=Sign*If(SellPres>BuyPres,BuyPres/Max(SellPres,0.00001),SellPres/Max(BuyPres,0.00001)); myDMI=100*If(TempDI<0,-1-TempDI,1-TempDI); plot1(mydmi,"myDMI") ;
프로필 이미지
ijh0316
2015-07-07
135
글번호 88138
지표

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

프로필 이미지
ijh0316
2015-07-07
0
글번호 88137
지표
답변완료

매매수식 부탁합니다.

수식부탁합니다 [수식1] (해외)선물 5분봉 기준으로 종가가 아닌 고가기준 20 주기 지수 이평선 저가기준 20 주기 지수 이평선 고가기준 5 주기 지수 이평선 저가기준 5 주기 지수 이평선 에서 - (저가 5)가 (저가 20)을 골든크로스일 때 매수진입, 이 이평선이 데드크로스 날 때 매수청산 - (고가 5)가 (고가 20)을 데드크로스일 때 매도진입, 이 이평선이 골든크로스 날 때 매도청산 [수식2] 위와 지수 이평선은 동일하고, 진입과 청산에서 - (저가 5)가 (저가 20)과 (고가 20)까지 모두 골든크로스일 때 매수진입, 그리고 (저가 5)가 (고가 20)을 데드크로스 날 때 매수청산 - (고가 5)가 (고가 20)과 (저가 20)까지 모두 데드크로스일 때 매도진입, 그리고 (고가 5)가 (저가 20)을 골든크로스 날 때 매도청산 -----------------------------------------------------<끝> 이렇게 수식 2가지 부탁드립니다. 수고하세요^^
프로필 이미지
시리우스
2015-07-07
121
글번호 88136
시스템
답변완료

누적손실시 진입제한 수식인데 오류가 있습니다.

게시판의 문의로 아래와 같은 수식을 받았습니다. 그런데 실제 시스템에 반영을 해보니... 손실이 15틱인데 신규진입이 안되고 있습니다. 6월5일을 보면 누적손실이 15틱인데.. 신규진입이 안됩니다. 수정해주신 수식은 아래와 같습니다. 확인부탁드립니다. 안녕하세요 예스스탁입니다. Input : shortPeriod(5), longPeriod(20), period(15); Input : 거래시간1(1), 시작시간1(090000), 끝시간1(020000); var : NP(0),preNP(0),dayPl(0); value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); value3 = ma(C, Period); Value4 = C/Value1*100; Value5 = PositionProfit; condition2 = IsExitName("stoploss",1); condition3 = 거래시간1==1 and (stime>=시작시간1 or stime<끝시간1); NP = NetProfit; if stime == 시작시간1 or (stime > 시작시간1 and stime[1] < 시작시간1) Then{ preNP = NP; } DayPl = NP-PreNP; if condition3==true then { If condition2 == false then {IF 매수조건 and (daypl < PriceScale*20 and daypl > -PriceScale*30) Then Buy("매수"); } Else { IF BarsSinceExit(1) >= 3 and 매수조건 and (daypl < PriceScale*20 and daypl > -PriceScale*30) Then Buy("매수진입"); } IF BarsSinceEntry > 3 and 청산조건 Then ExitLong("매도"); } SetStopTrailing(0.1,0.35,PointStop); SetStopLoss(0.10,PointStop); # 새벽2시50에 모두 청산하고자 하시면 아래 내용도 추가하시면 됩니다. if stime == 025000 or (stime > 025000 and stime[1] < 025000) Then { exitlong(); } 즐거운 하루되세요
프로필 이미지
참새사냥꾼
2015-07-07
148
글번호 88135
시스템
답변완료

시스템 수식 수정 부탁드립니다.

아래의 수식을 수정부탁드립니다. 기준봉(통상적으로 장대양봉)의 종가 아래 부분은 매수 구간이므로 전일 저가를 깨더라도 매도가 되어서는 안되는데 매수와 동시에 매도가 됩니다. 손절 규정은 기준봉의 저가 -1%를 이탈시에 매도가 되어야 하구요. 정상적인 매도는 기준봉의 종가보다 높은 구간에서만 매도가 되어야 합니다. 즉, 정리를 하면 기준봉의 시가와 종가 사이에서 매수하여 기준봉의 종가 위에 구간으로 상승한 후에 매도가 되어야 합니다. 부탁드릴께요.~~~ - 아 래 - input : 기준봉날짜 (20150701); var : 하한가(0), DnLimit(0); var : dn1(0), dn2(0), dn3(0), dn4(0), dn5(0),dn6(0),dn7(0); var : 상한가(0), UpLimit(0); var : up1(0), up2(0), up3(0), up4(0), up5(0),up6(0),Up7(0); if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then DnLimit = (BP * 0.12); Else if date >= 20050328 and date < 20150615 Then DnLimit = (BP * 0.15); Else DnLimit = (BP * 0.30); if CodeCategory() == 2 then { if date >= 20030721 then { dn1 = int(DnLimit/100)*100; dn2 = int(DnLimit/100)*100; dn3 = int(DnLimit/100)*100; dn4 = int(DnLimit/50)*50; dn5 = int(DnLimit/10)*10; dn6 = int(DnLimit/5)*5; dn7 = int(DnLimit/1)*1; } else { dn1 = int(DnLimit/1000)*1000; dn2 = int(DnLimit/500)*500; dn3 = int(DnLimit/100)*100; dn4 = int(DnLimit/50)*50; dn5 = int(DnLimit/10)*10; dn6 = int(DnLimit/10)*10; dn7 = int(DnLimit/1)*1; } } Else { dn1 = int(DnLimit/1000)*1000; dn2 = int(DnLimit/500)*500; dn3 = int(DnLimit/100)*100; dn4 = int(DnLimit/50)*50; dn5 = int(DnLimit/10)*10; dn6 = int(DnLimit/5)*5; dn7 = int(DnLimit/1)*1; } if CodeCategory() == 1 or CodeCategory() == 2 then { if sdate < 20101004 Then{ If BP >= 500000 Then 하한가 = BP-dn1; Else If BP >= 100000 Then 하한가 = BP-dn2; Else If BP >= 50000 Then 하한가 = BP-dn3; Else If BP >= 10000 Then 하한가 = BP-dn4; Else If BP >= 5000 Then 하한가 = BP-dn5; Else If BP >= 1000 Then 하한가 = BP-dn6; Else 하한가 = BP-dn6; } else{ If BP >= 500000 Then 하한가 = BP-dn1; Else If BP >= 100000 Then 하한가 = BP-dn2; Else If BP >= 50000 Then 하한가 = BP-dn3; Else If BP >= 10000 Then 하한가 = BP-dn4; Else If BP >= 5000 Then 하한가 = BP-dn5; Else If BP >= 1000 Then 하한가 = BP-dn6; Else 하한가 = BP-dn7; } } else if CodeCategory() == 8 or CodeCategory() == 9 then { 하한가 = BP-dn6; } } if date >= 19981207 then { if date < 20050328 && CodeCategory() == 2 then UpLimit = (BP[0] * 1.12); Else if date >= 20050328 and date < 20150615 Then UpLimit = (BP[0] * 1.15); Else UpLimit = (BP[0] * 1.30); if CodeCategory() == 2 then { if date >= 20030721 then { up1 = int(UpLimit/100+0.00001)*100; up2 = int(UpLimit/100+0.00001)*100; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/10+0.00001)*10; up7 = int(UpLimit/1+0.00001)*1; } } Else { up1 = int(UpLimit/1000+0.00001)*1000; up2 = int(UpLimit/500+0.00001)*500; up3 = int(UpLimit/100+0.00001)*100; up4 = int(UpLimit/50+0.00001)*50; up5 = int(UpLimit/10+0.00001)*10; up6 = int(UpLimit/5+0.00001)*5; up7 = int(UpLimit/1+0.00001)*1; } if CodeCategory() == 1 || CodeCategory() == 2 then { if sdate < 20101004 Then{ If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up6); } Else{ If BP >= 500000 Then 상한가 = up1; Else If BP >= 100000 Then 상한가 = iff(up2>=500000, up1, up2); Else If BP >= 50000 Then 상한가 = iff(up3>=100000, up2, up3); Else If BP >= 10000 Then 상한가 = iff(up4>=50000, up3, up4); Else If BP >= 5000 Then 상한가 = iff(up5>=10000, up4, up5); Else If BP >= 1000 Then 상한가 = iff(up5>=5000, up5, up6); Else 상한가 = iff(up6>=1000, up6, up7); } } else if CodeCategory() == 8 || CodeCategory() == 9 then { // ETF 상한가 = up6; } } if sdate == 기준봉날짜 Then{ value1 = abs(DayClose-dayopen); value2 = max(DayClose,dayopen); value3 = DayOpen; value4 = DayClose; if DayClose > DayOpen Then{ var1 = dayopen+value1*0.75; var2 = dayopen+value1*0.50; var3 = dayopen+value1*0.25; } Else{ var1 = dayopen-value1*0.75; var2 = dayopen-value1*0.50; var3 = dayopen-value1*0.25; } } if sdate > 기준봉날짜 and value4 > value3 Then{ #var1(75%)터치시 매수 if Condition1 == false and H < var1 Then Buy("매수11",AtStop,var1); if Condition1 == false and L > var1 Then Buy("매수12",Atlimit,var1); #var2(50%)터치시 매수 if Condition2 == false and H < var2 Then Buy("매수21",AtStop,var2); if Condition2 == false and L > var2 Then Buy("매수22",Atlimit,var2); #var3(25%)터치시 매수 if Condition3 == false and H < var3 Then Buy("매수31",AtStop,var3); if Condition3 == false and L > var3 Then Buy("매수32",Atlimit,var3); } if MarketPosition == 1 Then{ if LatestEntryName(0) == "매수11" or LatestEntryName(0) == "매수12" Then Condition1 = true; if LatestEntryName(0) == "매수21" or LatestEntryName(0) == "매수22" Then Condition2 = true; if LatestEntryName(0) == "매수31" or LatestEntryName(0) == "매수32" Then Condition3 = true; if stime < 150000 then ExitLong("상한가매도",atlimit,상한가); Exitlong("손절1",AtStop,daylow(1)*0.99); Exitlong("손절2",AtStop,daylow(1)*0.99,"",Floor(CurrentContracts*0.5),1); } Else{ Condition1 = false; Condition2 = false; Condition3 = false; }
프로필 이미지
승부사1
2015-07-07
120
글번호 88134
시스템

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

프로필 이미지
ahdzhr
2015-07-07
7
글번호 88133
시스템
답변완료

종목 검색식 부탁드립니다.

1. Stochastics Momentum Index의 plot1선과 plot12선이 각각 -40% 이하 일때의 종목을 검색하고자합니다. 수식이 가능 하는 지요? 2. 검색 기간이 일주일(즉 주중, 5일)이내 plot1선과 plot12선이 각각 -40% 이하 일때의 종목을 검색 수식이 가능 하는 지요? 좋은 답변 부탁드립니다.
프로필 이미지
달빛
2015-07-07
116
글번호 88132
검색
답변완료

부탁드립니다..

양합지표에서 MACD 오실레이트를 만드는대요.. 오실레이터 값이 0선위는 빨강색.. 0선아래는 파랑색 이렇게 색깔을 달리 할수 있게 해주시면 감사 하겟습니다.. 안녕히 계십시요 구벅 (__)
프로필 이미지
모수
2015-07-07
109
글번호 88128
지표